Skip to content

An users NodeJS API without packages libs or frameworks!

License

Notifications You must be signed in to change notification settings

than-dev/raw-nodejs-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project logo

NodeJS Users API - Without Frameworks And Packages

License


📝 Table of Contents


🧐 About

Purpose of this project was build a simple users API in a different way we see all time in nodeJS ecosystem, usually using Express, Adonis, Hapi... I used just the native modules of nodeJS and a JSON file as DataBank, that is managed using node fs



🏁 Getting Started


Installing

git clone https://github.com/NathanCotrim/NodeJS-API.git

or - (GitHub CLI)

gh repo clone NathanCotrim/NodeJS-API 

Running

node src/server.js

🎈 Usage


Main API Routes


GET | List all users


GET | Get user by Id


POST | Create User

Receives a JSON:

{
  "name": "Tester",
  "email": "[email protected]"
}

PATCH | Update User

Receives a JSON with new Information:

{
  "name": "TesterUpdated", (?)
  "email": "[email protected]" (?)
}

DELETE | Delete User



To request any route without an app use:

curl ${url} -X ${method}

⛏️ Built Using


About

An users NodeJS API without packages libs or frameworks!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published