Skip to content

Commit c7ba9d4

Browse files
author
seungwonme
committed
Update
1 parent 4c6c45d commit c7ba9d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+30
-165
lines changed

5_Application/what_is_difference_of_session_token_cookie.md

+1-1

README.md

+5-3

server/_web_server_in_CPP/Makefile

-60
This file was deleted.

server/_web_server_in_CPP/index.html

-11
This file was deleted.

server/_web_server_in_CPP/src/Socket/Socket.cpp

Whitespace-only changes.

server/_web_server_in_CPP/src/Socket/Socket.hpp

Whitespace-only changes.

server/_web_server_in_CPP/src/main.cpp

-90
This file was deleted.

server/_web_server_in_CPP/webServer

-39.7 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

server/express/app.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import express from "express";
2+
3+
const app = express();
4+
5+
// access POST request body
6+
app.use(express.json());
7+
8+
app.get("/", (req, res) => {
9+
res.send(req.body);
10+
});
11+
12+
app.post("/", (req, res) => {
13+
// echo server - send back the request body
14+
res.send({
15+
headers: req.headers,
16+
body: req.body,
17+
});
18+
});
19+
20+
app.listen(3000, () => {
21+
console.log("Server is running on http://localhost:3000");
22+
});

server/express/bun.lockb

24.9 KB
Binary file not shown.

server/express/curl.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
curl -s -X POST http://localhost:3000 -H "Content-Type: application/json" -d '{"query":"{hello}"}' | jq .

server/express/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "dependencies": { "express": "^4.21.0" } }

0 commit comments

Comments
 (0)