imwenny / NodeJS-API

An users NodeJS API without packages libs or frameworks!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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": "tester.test@domain.com"
}

PATCH | Update User

Receives a JSON with new Information:

{
  "name": "TesterUpdated", (?)
  "email": "testerUpdated.test@domain.com" (?)
}

DELETE | Delete User



⛏️ Built Using


✍️ Author - Nathan Cotrim - MIT License

About

An users NodeJS API without packages libs or frameworks!

License:MIT License


Languages

Language:JavaScript 100.0%