API for creating, reading, updating, and deleting notes. All routes are protected, requiring a JWT on the Authorization header, except for the login route
- Fork and clone repo to your local machine
- run
npm install
- run
npm run dev
to have nodemon run the server - run
npm start
to start the server
Check out the docs for information on the server and its endpoints:
- Login :
POST /api/login/
Requires an API key to login. You can store your own API key in a .env
file under PUBLIC_KEY
.
Other .env
variables you will need are
SALT_ROUNDS: Number for hashing passwords,
PORT: Port to host server, defaults to 5000,
SECRET_KEY: String holding key for securing JWT,
PUBLIC_KEY: Key to secure login route
Endpoints for viewing and manipulating Users
- Add a new User :
[POST] /api/users/
- Get all Users :
[GET] /api/users/
- Get single User :
[POST] /api/users/:id
- Update a User :
[POST] /api/users/:id
- Delete a User :
[POST] /api/users/:id
Endpoints for viewing and manipulating Notes
- Get all Notes :
[POST] /api/notes/
- Get all Notes :
[GET] /api/notes/
- Get single Note :
[POST] /api/notes/:id
- Update a Note :
[POST] /api/notes/:id
- Delete a Note :
[POST] /api/notes/:id