$ npm install
$ docker-compose up -d
#migrations
$ npm run migration:generate
$ npm run migration:run
# development
$ npm start
You should create the Postgres db and configure the .env file with that date.
POSTGRES_USER='some user'
POSTGRES_PASSWORD='some password'
POSTGRES_DB='some db name'
POSTGRES_PORT='some port'
JWT_SECRET='secretKay'
ADMIN = 'admin',
BOSS = 'boss',
REGULAR = 'regular',
{
"email": "[email protected]",
"password": "regula54r443254",
"username": "regul45ar54",
"role": "regular",
"bossId": 3
}
{
"email": "[email protected]",
"username": "boss",
"password": "boss111",
"role": "boss"
}
http://localhost:3000/users/7
http://localhost:3000/users/7/change-boss
{
"email": "[email protected]",
"password": "regula54r443254",
"username": "regul45ar54",
"role": "regular",
"bossId": 4
}