jyoo0515 / Memo_API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memo API

How to Start

1. Install dependencies

$ npm install

Also, install Docker if not installed

2. Create .env file

Example

TZ=Asia/Seoul
PORT=5000
POSTGRES_DB=memo
POSTGRES_USER=test
POSTGRES_PASSWORD=test

DB_SCHEMA=memo
DB_USER=test
DB_PASSWORD=test
DB_HOST=database

JWT_SECRET=random_string

How to create JWT_SECRET

$ node
$ require('crypto').randomBytes(64).toString('hex')
$ .exit

3. Run application

$ docker-compose up --build

4. Check Swagger document

Go to http://localhost:5000/docs to check out the api document an run tests

Testing

$ npm run test

About


Languages

Language:TypeScript 99.7%Language:Dockerfile 0.3%