OLO - Full App
  • Introduction
  • High Level Architecture
  • Installation
    • How to deploy in local machine
    • How to deploy in production
  • FAQS
  • License
  • API SERVER
    • Introduction
    • Technologies
    • Packages Json
    • Outline
  • ADMIN WEB DASHBOARD
    • Introduction
    • Technologies
    • Packages Json
    • Customize
  • CUSTOMER APP
    • Introduction
    • Packages Json
    • Technologies Used
    • Guide
      • Customize
  • Components
Powered by GitBook
On this page
  • Initiating Server
  • Mongodb
  • Express JS
  • GraphQL Routes
  • Api Routes

Was this helpful?

  1. API SERVER

Outline

PreviousPackages JsonNextIntroduction

Last updated 4 years ago

Was this helpful?

Initiating Server

npm start

Mongodb

We used which is a NoSql database. In the project we have configured it to used it with which is used as cloud database for both local and production enviroment by default. You can create your own mLab account and integrate it with your database by entering connectionstring in olo-api/app.js

Express JS

Express JS contains all the configuration details related to node server. It performs the following tasks:

  1. Create and start server

  2. Add different middleware namely:

    • bodyParser: Parse body params and attache them to req.body

    • Compress: Helps in decreasing the size of the response body and improve the speed of the API calls.

    • Json web token: Helps in generating authentication token

GraphQL Routes

It handles the different GraphQL routes of the application, namely:

  • auth: This route contains different routes related to the user such as registration of the new user, updating the user details, manages login and logout.

  • listing: Manages listing schema such as adding, deleting, editing and liking listing.

Api Routes

It handles the different REST routes of the application, namely:

  • GraphQL: It handles all routes related to GraphQL.

  • Paypal: It handles when payment is made using Paypal.

  • Stripe: It handles when payment is made using Stripe.

Mongodb
mLab