Giter Site home page Giter Site logo

carbeeza-backend's Introduction

Marketplace-v2-API

Name

Marketplace-v2 API development.

Description

Installation

Clone repository, then install dependencies with:

npm i

Local NodeJS

Create a .env file in the root project directory that looks like this, or set these environment variables:

MONGODB_CONNECTION_STRING=mongodb+srv://{DB_USER}:{DB_PASSWORD}@{DB_HOST_ADDRESS}
MONGODB_DEALERS_DB=name_of_database
MONGODB_DEALERS_COLLECTION=name_of_collection
MONGODB_LENDERS_DB=name_of_database
MONGODB_LENDER_COLLECTION=name_of_collection
MONGODB_GROUPS_DB=name_of_database
MONGODB_GROUPS_COLLECTION=name_of_collection
MONGODB_INVENTORY_DB=name_of_database
MONGODB_INVENTORY_COLLECTION_CA=name_of_collection
MONGODB_INVENTORY_COLLECTION_US=name_of_collection
MONGODB_AGENTS_DB=name_of_database
MONGODB_AGENTS_COLLECTION=name_of_collection

SMTP_HOST=smtp.email.com
SMTP_PORT=587 # use port for TLS
[email protected]
SMTP_PASS=***********************

BASE_PORT=3000
BASE_URL=http://localhost:3000 # Port should match port above, unless standard HTTP/HTTPS.
BASE_GUI_URL=''
SUPPORT_URL=''

SERVERLESS=0

Compile and run with:

npm start

Serverless.com

Make sure you have the serverless CLI tool from serverless.com installed and configured correctly with AWS credentials.

Create a serverless-dev.yml or serverless-prod.yml file in the root project directory that looks like this:

service: 

plugins:
  - serverless-offline
provider:
  name: aws
  runtime: nodejs18.x
  stage: dev
  region: us-east-1
  timeout: 15
  apiGateway:
    minimumCompressionSize: 1024
  environment:
    MONGODB_CONNECTION_STRING: mongodb+srv://{DB_USER}:{DB_PASSWORD}@{DB_HOST_ADDRESS}
    MONGODB_DEALERS_DB: name_of_database
    MONGODB_DEALERS_COLLECTION: name_of_collection
    MONGODB_DEALERS_DB: name_of_database
    MONGODB_DEALERS_COLLECTION: name_of_collection
    MONGODB_LENDERS_DB: name_of_database
    MONGODB_LENDER_COLLECTION: name_of_collection
    MONGODB_GROUPS_DB: name_of_database
    MONGODB_GROUPS_COLLECTION: name_of_collection
    MONGODB_INVENTORY_DB: name_of_database
    MONGODB_INVENTORY_COLLECTION_CA: name_of_collection
    MONGODB_INVENTORY_COLLECTION_US: name_of_collection
    MONGODB_AGENTS_DB: name_of_database
    MONGODB_AGENTS_COLLECTION: name_of_collection
    SMTP_HOST: "smtp.email.com"
    SMTP_PORT: 587 # use port for TLS
    SMTP_USER: "[email protected]"
    SMTP_PASS: "***********************"
    BASE_URL: "" # The base URL of the serverless function, may need to deploy twice at first to get this.
    BASE_GUI_URL: ''
    SUPPORT_URL: ''

functions:
  app:
    handler: dist/index.handler
    events:
      - http: ANY /
      - http: "ANY /{proxy+}"

Compile and run locally with:

npm run deploy-local

Compile and deploy to serverless.com with :

Dev:

npm run deploy-dev

Prod:

npm run deploy-prod

Usage

These are the endpoints:

  • /new-dealer

Authors and acknowledgment

Project status

In Development.

carbeeza-backend's People

Contributors

waxp2edev0101 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.