This NodeJS application is a simple API built using pure Node.js v20.10.0. It implements a file-based database and provides CRUD (Create, Read, Update, Delete) functionality for managing users.
- CRUD operations for managing users
- File-based database implementation
- Example of Node.js stream module
- Node.js v20.10.0
- Clone this repository:
git clone https://github.com/DaniloNR/nodejs-crud.git- Navigate to the project directory:
cd nodejs-crud- Run the application:
pnpm run dev- GET /users: Get all users
- GET /users?search={text}: Get all users containing the the query string
- GET /users/{id}: Get user by ID
- POST /users: Create a new user
- PUT /users/{id}: Update user by ID
- DELETE /users/{id}: Delete user by ID
The server starts on http://localhost:3333
MIT License © Danilo Nogueira
Feel free to clone this repo and use the way you want it!
I'm open to new ideas or suggestions, and I will try to implement those here.