An open API service indexing awesome lists of open source software.

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.

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:



LinkedIn


Telegram


Discord


Twitter


Gmail