# How to deploy in production

## Api server <a href="#api-server" id="api-server"></a>

**Installation steps**

Clone the app

Step1: Go to ApiServer folder

* Enter `npm i`

Step2: Export node environment by `export NODE_ENV=production` Do check if it is set by `echo $NODE_ENV` it Prompts as production.

Step3: Enter `npm run build`

Step4: Run forever now enter `forever start dist` Check if forever is running by entering `forever list`

## Mobile App <a href="#mobile-appriderdriver" id="mobile-appriderdriver"></a>

Make sure you have a developer account on the Play Store / App Store.

### To deploy on the App store(ios) follow the links <a href="#to-deploy-on-the-app-storeios-follow-the-links" id="to-deploy-on-the-app-storeios-follow-the-links"></a>

• Generating Certificates follow [here](https://www.raywenderlich.com/127936/submit-an-app-part-1) • Releasing build and publish app [link](https://help.apple.com/itunes-connect/developer/#/)​

### To deploy on Play store(Android) follow the link <a href="#to-deploy-on-play-storeandroid-follow-the-link" id="to-deploy-on-play-storeandroid-follow-the-link"></a>

• Building signed apk follow [here](https://facebook.github.io/react-native/docs/signed-apk-android.html) • Releasing build and publish app [link](https://www.raywenderlich.com/122114/android-app-distribution-tutorial-zero-google-play-store)


---

# 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://geekyants-5.gitbook.io/flatandflatmates/installation/how-to-deploy-in-production.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.
