GithubHelp home page GithubHelp logo

1car-be's Introduction

Description

This application uses NestJS framework along with TypeORM and PostgreSQL for database implementation.

Pre-installation

Please make sure that you installed PostgreSQL before running the app. In the .env please fill out all the required configurations for database connection. Example:

NEST_APP_AUTH0_DOMAIN=dev-elws5e13.us.auth0.com
NEST_APP_AUTH0_CLIENT_ID=sydQIoZtakHrJ9b4dvfzWyCs2ZGWwFzs
NEST_APP_AUTH0_AUDIENCE=http://localhost:8000/api/validate-token
NEST_APP_AUTH0_SECRET=RS256
NEST_APP_AUTH0_ISSUE_URL=https://dev-elws5e13.us.auth0.com/
NEST_APP_AUTH0_AUDIENCE=http://localhost:3000
DEVELOPEMENT_STAGE=dev
TOKEN_EXPIRE_TIME=5000000000000000s
BASE_URL=http://localhost:8080

PORT=8080
BASE_URL=localhost:8080
CLIENT_BASE_URL=localhost:3000
UPLOAD_API_KEY=93e0edd4fa1760adf671cc2805eeb5ff
DATABASE_HOST=localhost
DATABASE_NAME=1car
DATABASE_USER=postgres
DATABASE_PASSWORD=admin
DATABASE_PORT=5432

STRIPE_SECRET_KEY=sk_test_51LZcoyKdTNhAxbgQLZxYRaHpgvOrU9R6AAMpriCTWskay8zV0JNSbVqDKrOFDNf4onQZNxdsL6B7fUHjwsUijUnH00bYI1i3B1
STRIPE_INTENT_WEBHOOK_SIG_KEY=whsec_7qryncD9gTfGE1v3UZW0aYDxuSyGQ5BX

EMAIL_FIELD_NAME=https://example.com/email

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Integrate with Auth0

I config ultrahook to work with Auth0 post registration hook. When sign up using Auth0 universal login successfully, it will send info to the below endpoint.

The api key: HPVB6Nap29id7WFMSagiLYCekexfKEcQ

The post registration will hit https://ninahuynh-auth0.ultrahook.com. This will proxy to http://localhost:8080, our backend app.

Get started with ultrahook

Register your link here

Save the Api key get from ultrahook after create: echo "api_key: apikey" > ~/.ultrahook

And install the UltraHook client: gem install ultrahook

Start by running ultrahook auth0 8080/user

Add your link into hooks code urlArray and save it Auth0 hooks

img.png

Test and run by using Runner and see if the request is made successfully or not by checking the terminal img.png

img.png

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.