Skip to content

Configuring ENV Variables for Backend

tks18 edited this page Dec 7, 2020 · 11 revisions

Special Steps if You have Deployed using Method 2 (i.e. Manually Using Git and Heroku):

  • If You have Deployed Manually Using Git and Heroku, then You have to follow the Following Steps to Configure Your Variables:

    • Login in to Your Heroku Account.

    • Open the App in which You have Deployed the backend.

    • Navigate to Settings Tab inside the app.

    • Click on the Button Reveal Vars to Reveal the Variable Section.

    • Very Important: See that the Variable name should be Same as the Below. All Variable Names will be in Uppercase..

  • In case You have Used my gindex-cli-tool, You don't have to worry about this, since everything will be taken care by the tool. You have to enter only the variable values.

Variables to be Configured:

  • DBURL:

    • Put the Connection String that You have Copied When you Setted up the MongoDB
    • If Not, Go to Here and Copy the Connection String.

    https://telegra.ph/file/714c7545f23cf077ec013.png

  • SITE:

    • This is your heroku backend site address, which should be as follows:

    https://telegra.ph/file/54853b23660ac00d5170c.png

  • EMAILID:

    • Put the Email id that You have Created.

    • If Not, Go to Here and Follow the Steps.

    https://telegra.ph/file/25ef1499c5004a8a50cee.png

  • EMAILPASS:

    • Put Your Email Password for the SMTP Mail Account you have Created.

    • If Not, Go to Here and Follow the Steps.

    https://telegra.ph/file/53d1600e721b6f8449a87.png

  • EMAILPORT:

    • Put the SMTP Port of the SMTP Mail Account.
    • If Not, Go to Here and Follow the Steps.

    https://telegra.ph/file/db269b59f966f71c9c29f.png

  • EMAILSERVICE:

    • Enter the SMTP Mail Provider Name.
    • Example: Yahoo, Yandex.

    https://telegra.ph/file/fe6271d0f75887186ce9c.png

  • EMAILSMTP:

    • Enter the SMTP address you have Copied for the SMTP Mail Account.
    • If Not, Go to Here and Follow the Steps.

    https://telegra.ph/file/f2df03abd3ef74bda2c7a.png

  • ADMINEMAIL:

    • Enter the Root User's Email id - can be Anything, Need not be Same as the SMTP Mail Account email id.
    • User Requests to Join will be Sent to this Admin Email, then the Admin can Accept the Requests.

    https://telegra.ph/file/2af4a67f683b1c43fdcba.png

  • REPLYTOMAIL:

    • Enter the Email same as Admin Email Variable before.

    https://telegra.ph/file/58c13104b287ca6f996ba.png

  • MAXSESSIONS:

    • This is used to restrict usage of account on desired number of login on different devices/browsers.

    • For example: if you enter 2 maxsessions then you can login in 2 devices/browsers at one time and if you login in 3rd device then 1st one will get logged out

    • Enter numeric value only!

  • EMAILGIF:

    • This will be used to enter a photo on top of emails.

    • Enter a JPG/PNG/GIF and maintain 4:5 ratio otherwise it will land in spam!

    https://telegra.ph/file/e345ab0e7c5f515920d35.png

  • SITESECRET:

    • This will be used when setting up root/superadmin user in backend to verify its you.

    https://telegra.ph/file/4b24d7c706a33d8ce5801.png

  • TMDBAPI:

    • This will be used to render Movies/TV Series posters and information.

    • Get the API Key from this Step

  • FRONTENDURL:

    • This will be front end URL, if you wish you can GA domain or just stuck with workers domain, You can visit here to create a worker on cloudflare and get a free .ga domain!

    • Multiple URL's Can be Given by Putting a , Example: https://sample1.com,https://sample2.com

    • URL's Should Contain http / https and Should not Contain a trailing / at the end.

    https://telegra.ph/file/5d5c7a94720023e525b35.png

  • FRONTENDSITENAME:

    • Name it anything as per your choice for example: MyIndex

    • This will show in automated e-mail templates.

    https://telegra.ph/file/c18394ca87f26498e330f.png

  • TOKENSECRET:

    • It can be anything randomly generated. This will be Used to Issue JSON Web Tokens and Verify it. Recommended to Have Minimum 15 to 20 Characters. That will be Safe.

    • Use https://passwordsgenerator.net for generating long string.

    https://telegra.ph/file/7636ce96549c69964b0f5.png

That's it Regarding Configuring Variables for Backend. After all this, It should be Up and Running

Go Back
Go to Next Page

Clone this wiki locally