# Outline

### Initiating Server

`npm start`&#x20;

## Mongodb

We used [Mongodb](https://www.mongodb.com) which is a NoSql database. In the project we have configured it to used it with [mLab](https://mlab.com/) 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`&#x20;

## 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:
3. * **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.&#x20;
* **Paypal:** It handles when payment is made using Paypal.
* **Stripe:** It handles when payment is made using Stripe.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://listing-nb.gitbook.io/olo-full-app/api-server/outline.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
