Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mahmoud-elghonemy/iti-nodejs-labs
ITI NodeJs Labs
https://github.com/mahmoud-elghonemy/iti-nodejs-labs
api backend backend-server express fs joi js json labs mangodb mongoose nodejs restful-api
Last synced: 12 days ago
JSON representation
ITI NodeJs Labs
- Host: GitHub
- URL: https://github.com/mahmoud-elghonemy/iti-nodejs-labs
- Owner: mahmoud-elghonemy
- Created: 2023-03-09T07:54:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-03-24T11:53:10.000Z (over 1 year ago)
- Last Synced: 2024-08-26T23:17:40.351Z (3 months ago)
- Topics: api, backend, backend-server, express, fs, joi, js, json, labs, mangodb, mongoose, nodejs, restful-api
- Language: JavaScript
- Homepage:
- Size: 882 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ITI-NodeJs-Labs
ITI-NodeJs-Labs## Lab Day 1
Create CRUD Operation using async fucntions file system database## Lab Day 2
Create CRUD Operation using express on file system database
## Lab Day 3
Start new express app
Use morgan to log the requests
serve the following apis
A todo has id, title, status
- api to create new todo inside todos.json
- api to get all todos with filter for status
- api to get a single todo based on id
- api to edit a single todo based on id
- api to delete a single todo based on id
In get todos api provide a filter for status### bonus
In create and update apis validate user’s data for title and status, the title
should be a string with minimum 3 and maximum 20 length, the status should be
one of these values(todo, in-progress, done)## Day 4 Lab
- Implement Authentication and authorization functionality in our todo app
(singup and signin).
- Use bcrypt and jsonwebtoken packages when needed.
- Use Joi Package to validate the incoming body request https://joi.dev
- Protect creating,updating and deleting todo apis so that only authorized
user can perform these actions## Lab 5
Create relationship between user and todo models so that one user can have more than one
todo.
Implement the following guidelines while building your todo apis.
- When creating todo it must belong to certain user
- When getting todos only the logged in user todos are returned
Notes to consider:
- Use environment variables to protect sensitive data (dotenv)
- Use cors policy to allow requests from clients (cors)
- Upload the final project to github.
- Protect sensitive information like password form returning in response### Bonus:
Deploy the app to service provider such as render https://render.com/