Node.js with Streams, a Rest API using the HTTP native module and a simple local Database with JSON.
This project was developed during a @rocketseat course for study purposes.
Node.js | Streams | Rest API | Middleware | HTTP | JSON Database | Regex |
Install dependencies
npm install
Start the server on port: 3334
.
npm run stream-server
With the server up, run the fake stream upload:
npm run stream-upload
Start the server on port: 3333
.
npm run dev
Retrieves a list of users. You can pass a query parameter search
to filter users by their id
, name
, or email
.
-
Query Parameters:
search
(optional): A string to filter users.
-
Response:
200 OK
: Returns an array of user objects.
Creates a new user.
-
Request Body:
name
: Name of the user.email
: Email of the user.
-
Response:
201 Created
: Returns the created user object.
Updates an existing user.
-
URL Parameters:
id
: The unique identifier of the user.
-
Request Body:
name
: New name of the user.email
: New email of the user.
-
Response:
204 No Content
: Indicates successful update.
Deletes a user.
-
URL Parameters:
id
: The unique identifier of the user.
-
Response:
204 No Content
: Indicates successful deletion.
- Fork this repository
- Create a branch with your feature:
git checkout -b my-feature
- Commit your changes:
git commit -m 'feat: add my new feature'
- Push it to your branch:
git push origin my-feature
After merging your pull request, your branch can be deleted.
Check the details about the types, verbs and commit messages here CONTRIBUTING.md
Also check the CODE_OF_CONDUCT.md
This project is MIT Licensed