Todo application with Express.js and static page. The project is still WIP ... Base code comes from here
(1) Install NodeJS if not yet installed
(2) Install dependant packages
npm install
(3) Run the app
node app.js
Expected output would be like this
Server is running on port 3000
Now you're ready to access the app (static-page)
curl http://localhost:3000
You can access the backend API directory. See the next section
Post todo
curl --location 'localhost:3000/todos' \
--header 'Content-Type: application/json' \
--data '{
"title": "District Brand Technician"
}'
Put todo
curl --location --request PUT 'localhost:3000/todos/<ID>' \
--header 'cache-control: no-cache' \
--header 'Content-Type: application/json' \
--data '{
"completed": false
}'
Delete todo
curl --location --request DELETE 'localhost:3000/todos/<ID>' \
--header 'origin: http://localhost:3000'
Get todo
curl --location 'localhost:3000/todos/<ID>'
Get all todos
curl --location 'localhost:3000/todos'
- add more docs
- store data in mongoDB