Here i was built the Simple Note App which specially for backend only.
Express.js, or simply Express, is a web application framework for Node.js. More about Express
- node_modules
- Postman
- Web Server (ex. localhost)
- Open CMD or Terminal and enter to the app directory
- Type
npm install
- Make a new file called .env in the root directory, set up first here
- Turn on Web Server and MySQL can using Third-party tool like xampp, etc.
- Import file simple_note_app.sql to phpmyadmin
- Open Postman desktop application or Chrome web app extension that has installed before
- Choose HTTP Method and enter request url.(ex. localhost:3000/notes)
- You can see all the end point here
Open .env file on your favorite code editor, and copy paste this code below :
NODE_ENV=development
PORT= // fill with your port
DB_HOST=localhost
DB_USER=root // default
DB_PASS= // default
DB_NAME=simple_note_app
1. GET
/notes
/notes/:id
(Get notes by id)/category
/category/:id
(Get category by id)/notes/category/:id
(Get notes by category id)/all-notes
(Get all notes with category name)/notes?search=note_title
(Search operation)/notes?sort=
(Sort operation) // fill with asc or desc/notes?page=
(Paging for limiting notes) // fill only with integer
2. POST
/notes
/category
3. PATCH
/notes/:id
(Update notes by id)/category/:id
(Update category by id)
4. DELETE
/notes/:id
(Delete notes by id)/category/:id
(Delete category by id)