Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 1.87 KB

README.md

File metadata and controls

79 lines (57 loc) · 1.87 KB

JWT-Auth Microservice for Ivi Clone backend

Nest Logo

Description

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.

Requirements

  • Postgres
  • RabbitMQ
  • NodeJs, npm

Installation

$ npm i

Note: If you downloaded this repo from main repo script, there is no need to run install command.

Setting up & running service

For localhost

  1. Create database named auth using Postgres.
  2. Set up .dev.env file.
  3. Run service!
# watch mode
$ npm run start:dev

For Docker

Set up a .docker.env file and continue follow main repo instructions.

.env file parameters (not self-explanatory)

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.

Test

Create database 'auth_tests' in Postgres. The database credentials from .dev.env file will be used.

# unit tests
$ npm run test

Author

Vladimir Andreev

Description