Giter VIP home page Giter VIP logo

nest-email-otp's Introduction

Installation

$ npm install
# for running application
npm i pm2 -g

Running the app

# development
$ npm run start:pm2

Before Running application

Make sure to install pm2 (globally, if you like)
  * create a file pm2-bash.config.js in the root directory
  * The configuration file looks like this format

  ```bash
  module.exports = {
  apps: [
    {
      name: 'Nest Email Otp Auth',
      script: 'dist/main.js',
      env_development: {
        PORT: 3000,
        NODE_ENV: 'development',
        DB_CONFIG: JSON.stringify({
          type: 'postgres',
          host: 'localhost',
          username: '<YOUR USERNAME>',
          password: '<YOUR PASSWORD',
          database: '<YOUR DATABASE',
          entities: ['dist/database/**/*.entity.{ts,js}'],
          synchronize: <true or false>,
          logging: true,
          keepConnectionAlive: true
        }),
        AWS_CONFIG: JSON.stringify({
          region: '<YOUR AWS REGION>',
          apiVersion: '2010-12-01',
          credentials: {
            accessKeyId: '<YOUR AWS ACCESS KEY ID>',
            secretAccessKey: '<YOUR AWS SECRET KEY ACCESS>'
          }
        }),
        OTP_CONFIG: JSON.stringify({
          minLength: 6,
          digits: true,
          lowerCaseAlphabets: false,
          upperCaseAlphabets: false,
          specialChars: false
        }),
        BCRYPT_ROUNDS: 10,
        MAIL_TO_DEFAULT: <YOUR VERIFIED SES EMAIL>,
      }
    }
  ]
};

Other required prerequisite

  - Require a verified SES email sender.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.