JWT-Auth Microservice for Ivi Clone backend
This microservice is a part of Ivi Clone backend application. Here you can find an instructions for setting up and running microservice.
If you found this repo before exploring the main repo, I recommend you to explore main repo firstly for understanding how to run the application.
- Postgres
- RabbitMQ
- NodeJs, npm
$ npm i
Note: If you downloaded this repo from main repo script, there is no need to run install command.
- Create database named auth using Postgres.
- Set up .dev.env file.
- Run service!
# watch mode
$ npm run start:dev
Set up a .docker.env file and continue follow main repo instructions.
GOOGLE_CLIENT_ID
GOOGLE_SECRET
Google parameters for oauth. You can get them by creating an app here: https://console.cloud.google.com/apis/dashboard
SMTP_HOST
SMTP_PORT
SMTP_USER
SMTP_PASSWORD
These are parameters for an email account from which an activation mail will be sent from. They're not required to run the microservice if this feature is not required.
API_URL=http://193.32.203.137:4000
API URL should be an external address of API Gateway. It's required for oauth features to work.
Create database 'auth_tests' in Postgres. The database credentials from .dev.env file will be used.
# unit tests
$ npm run test