User API (CRUD) built using Node.js without any framework, with the goal of learning and demonstrating how Node works under the hood, focusing on its internal workings.
The API allows to create, update, delete, and retrieve data using filters. The repository also inclues some code files about Streams, which Node is known for being very good at.
- JavaScript
- Node.js (v. 18)
To run the project locally, get a clone of it and access its directory, then execute:
$ npm run dev
Make sure you are using Node version 18, to execute the server in watch mode.
The server will start on TCP port 3333.
For testing, you can use an API client like Insomnia.
Retrieve users with or without query parameters
GET /users
GET /users?name=nameExample&email=email-example@email.com
Create a user via body request
POST /users
{
"name": "Leandro",
"email": "leandro@email.com"
}
Update a user via route paramaters and body request
PUT /users/id
{
"name": "Camila",
}
Delete a user via route paramaters
DELETE /users/id
Project under MIT license.