Giter Site home page Giter Site logo

golangbootcamp's Introduction

Simple Session on node with Loopback

Hi I'm Luis and this is a rest api which will provide authentication to the user generating a JWT and sending an OTP from message bird. The application is based on node with express and the loopback 4 framework, it currently has the database implemented in MySql but uses typeORM as a database manager so you can use any of the ones it supports

Prerequisites

To run the program we need the following

  • Node v14.8.0 ++
  • MySql 8.0.21 ++

Run the scripts

Firs create a database and run the following scripts in the path:

db/tables

In the following order:

  • Rol.sql
  • Otp.sql
  • Usuario.sql
  • RolUsuario.sql

Create an account on MessageBird

Go to message bird create an account and get your Key and the phone originator of the messages

Variables

Please declare the next variables on your process.env

Env Name Value
NODE_ENV DEV
MESSAGEBIRD_KEY message_bird_key
MESSAGEBIRDORIGINATOR message_bird_originator

Run the project

Open the project dir on terminal and run:

npm install
npm run clean
npm run build
npm run start

Consume the end-points

A swagger interface is launch on thelocalhost:3000/explorer check it for more references, the happy route is:

http://localhost:3000/$PATH
  • /helloword - GET
  • /usuario/requireSignUp
  • /usuario/signUp
  • /usuario/signIn

golangbootcamp's People

Contributors

alonserrano avatar

Watchers

 avatar

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.