> For the complete documentation index, see [llms.txt](https://docs.mernkit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mernkit.com/back-end/environmental-variables.md).

# Environmental Variables

In designing MERNKIT I wanted the platform to be as plug and play as possible. Therefore, the setup is almost entirely managed by setting environmental variables. For development, you will edit the nodemon.json file. Depending on how you deploy your platform into production you will need to copy this information into a different area. I will share documentation on how to setup MERNKIT on AWS at the end of the section.&#x20;

Your nodemon.json file will contain the following empty variables that must be filled out. I will put descriptions where your variable value should go.&#x20;

* Callback values can be left as is provided you configure Google and Facebook with the same URLs.&#x20;
* FRONTEND\_URL value can also be left as is in the default configuration.&#x20;
* COOKIEDOMAIN should be left as localhost for testing. This should be set as the top level domain so the frontend has access to the cookie sent by the backend if you are using different subdomains for the frontend and backend. For example api.mernkit.com (backend) /app.mernkit.com (frontend)&#x20;

```
{
    "env": {
        "PROJECTNAME": "Your Product Name",  
        "DB_USER": "MongoDB Atlas USer",
        "DB_PWD": "MongoDB Atlas Password",
        "DB_NAME": "MongoDB Database Name",
        "KEY": "Encryption Key for JWT", 
        "FACEBOOK_CLIENT_ID":"Client ID for Facebook Auth",
        "FACEBOOK_CLIENT_SECRET":"Secret for Facebook Auth",
        "FACEBOOK_CALLBACK_URL":"/api/users/fb/cb", 
        "GOOGLE_CLIENT_ID":"Client ID for Google",
        "GOOGLE_CLIENT_SECRET": "Client Secret for Google",
        "GOOGLE_CALLBACK_URL": "/api/users/google/cb",
        "FRONTEND_URL":"http://localhost:3000",
        "MAILGUN_APIKEY": "Mailgun API Key",
        "MAILGUN_DOMAIN":"Mailgun domain (see Mailgun website)",
        "MAILGUN_FROM": "See mailgun website",
        "MAILGUN_TEMPLATE_SENDCONF": "Create Mailgun Template and place name here",
        "MAILGUN_TEMPLATE_PWRESET": "Same as above",
        "MAILGUN_TEMPLATE_ADDUSER": "Same as above",
        "COOKIEDOMAIN": "localhost", 
        "STRIPEID": "Stripe Private ID",
        "DEFAULTPRICE": "Default Price ID for trials",
        "TRIALPERIODDAYS": "Number of days you want your default trial to last"
        }
    }
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mernkit.com/back-end/environmental-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
