Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serhiinikif/todo-list-nest
https://github.com/serhiinikif/todo-list-nest
bcryptjs class-validator cross-env docker-compose dotenv error-handling jwt middlewares nestjs nodejs postgresql rest-api sequelize-orm swagger-ui typescript uuid yml
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/serhiinikif/todo-list-nest
- Owner: SerhiiNikif
- Created: 2023-08-25T13:34:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-28T10:37:26.000Z (over 1 year ago)
- Last Synced: 2024-10-14T22:41:47.434Z (2 months ago)
- Topics: bcryptjs, class-validator, cross-env, docker-compose, dotenv, error-handling, jwt, middlewares, nestjs, nodejs, postgresql, rest-api, sequelize-orm, swagger-ui, typescript, uuid, yml
- Language: TypeScript
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to use
## 1. Clone Project into your local machine
```
git clone https://github.com/SerhiiNikif/todo-list-nest.git
```## 2. Go into project folder
```
cd todo-list-nest
```## 3. Setting environment file .env.
Create an `.development.env` file in the root of the project and fill it with the values from the `.development.env.example` file.```
PORT=7000
POSTGRES_HOST=postgres
POSTGRES_USER=db_user
POSTGRES_PASSWORD=db_password
POSTGRES_DB=db_name
POSTGRES_PORT=5432
PRIVATE_KEY=secret_key
```> Depending on how you run the project, the value of the __POSTGRES_HOST__ variable will change:
__docker__:
POSTGRES_HOST=postgres__locally__:
POSTGRES_HOST=localhost## 4. Start project
> #### Docker need to be installed in your OS. To install Docker, please click [here](https://docs.docker.com/get-docker/).Enter this command so that the dist folder appears (it is needed in the Dockerfile)
```
npm run build
``````
docker-compose up
```Or run the project locally
```
npm install
``````
npm run start:dev
```## 5. Play with APIs now !
Now, you are ready to test all APIs.
Just simply open your browser http://localhost:5000/api/docs.> All APIs are protected by accessToken (JWT).
## When calling these protected APIs, make sure you add %BearerToken% in `Authorization` request Header.
```
Authorization: Bearer
```## How to get accessToken ?
When user login sucessfully, an unique accessToken will be returned.