Skip to content

sweetbix/todo-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To do list (MERN + TailwindCSS)

Access site here

Nothing much here... go check out frontend here

File structure

backend/
│── models/         # Mongoose models
│── routes/         # API route handlers
│── middleware/     # Auth middleware
│── server.js       # Main server file
│── package.json    # Dependencies

API Endpoints

Auth routes

Method Endpoint Description
POST /api/auth/register Create new user on database, and automatically sign in
POST /api/auth/login Log in to existing account
POST /api/auth/logout Log out and clear cookies
GET /api/auth/check Check if user was last logged in

Todos routes

Method Endpoint Description
GET /api/todos Retrieve all todos from user
POST /api/todos Create a new todo
PUT /api/todos/:id Mark specified todo as completed or update todo text
DELETE /api/todos/:id Delete specified todo
DELETE /api/todos Clear all todos

Development

Need to have Node.js installed

node server.js

About

Backend for simple to-do app (MERN)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published