https://github.com/stefcameron/node-http
Pure Node.js http-based server exploration
https://github.com/stefcameron/node-http
Last synced: 9 months ago
JSON representation
Pure Node.js http-based server exploration
- Host: GitHub
- URL: https://github.com/stefcameron/node-http
- Owner: stefcameron
- Created: 2023-07-20T00:01:49.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-20T00:03:10.000Z (over 2 years ago)
- Last Synced: 2025-01-30T16:46:24.018Z (11 months ago)
- Language: JavaScript
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-http
Pure Node.js http-based server exploration.
## References
- https://www.digitalocean.com/community/tutorials/how-to-create-a-web-server-in-node-js-with-the-http-module
- Typings: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/http.d.ts
## Routes
- `GET /`: "Hello, world!"
- `GET /users`: Array of user objects (JSON).
- `GET /users/{id}`: Single user object (JSON).
- `GET /users/{id}/profile`: User profile image (binary).
- `POST /users {user}`: Create user (JSON).
- `PUT /users/{id} {user}`: Update user (JSON).
- `DELETE /users/{id}`: Delete user.
## Run server
`npm start`