https://github.com/vovoka-path/todo-app-api
API for '/todo-app' (see my github). Use Node, Express, MySQL, Sequelize.
https://github.com/vovoka-path/todo-app-api
bcrypt express jsonwebtoken mysql2 node nodejs
Last synced: 3 months ago
JSON representation
API for '/todo-app' (see my github). Use Node, Express, MySQL, Sequelize.
- Host: GitHub
- URL: https://github.com/vovoka-path/todo-app-api
- Owner: vovoka-path
- Created: 2023-02-01T20:56:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-13T10:24:27.000Z (over 3 years ago)
- Last Synced: 2025-01-22T01:14:12.172Z (over 1 year ago)
- Topics: bcrypt, express, jsonwebtoken, mysql2, node, nodejs
- Language: JavaScript
- Homepage: https://todo-app-api-production.up.railway.app/
- Size: 42 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# todo-app-api
Created for BeeGee.
##### [Source code](https://github.com/vovoka-path/todo-app-api) | [Deploy](https://todo-app-api-production.up.railway.app/)
### Stack
- Node.js
- Express
- MySQL
- Sequelize
- jsonwebtoken
- bcrypt
### Frontend (Todo app) for this API
- [Source code](https://github.com/vovoka-path/todo-app)
- [Deploy](https://todo-app-beegee.vercel.app)
### REST endpoints
#### Todos
###### Get all: `GET` `/api/todos`
###### Get by id: `GET` `/api/todos/:id`
###### Create: `POST` `/api/todos`
Body: { userName, email, title, isDone, isEdited }
###### Update: `PUT` `/api/todos/:id`
Body: { id, title, isDone, isEdited }
###### Delete: `DELETE` `/api/todos/:id`
#### Users
###### Sign up: `POST` `/api/users/signup`
Body: { login, password }
###### Sign in: `POST` `/api/users/signin`
Body: { login, password }
###### Sign out: `POST` `/api/users/signout`
###### Check authorization: `POST` `/api/users/checkauth`
###### Refresh tokens/authorization: `GET` `/api/users/refresh`
### Install
###### `npm i`
### Available Scripts
###### `npm run develop`
You will also see logs in the console.
## Enviroment variables
`CLIENT_URL="https://todo-app-api-production.up.railway.app/"`
`PORT=8080`
`DATABASE_NAME="DB name"`
`DATABASE_HOST="DB host"`
`DATABASE_USERNAME="DB username"`
`DATABASE_PASSWORD="DB password"`
`DATABASE_DIALECT="mysql"`
`SALT_ROUNDS=5`
`ACCESS_SECRET_KEY="some-words"`
`REFRESH_SECRET_KEY="some-another-words"`
### Developer
[Vladimir Polansky](https://vovoka.space)
### Contact me: