Skip to content

JcJet/ivi-clone-auth-ms

Repository files navigation

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

About

JWT-Auth microservice for movies project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published