Environment Configuration

Welcome to the .env Configuration page for Substrate Starterkit. Here you'll find the list of env variables to help you configure and start your backend.

General Settings

  • NODE_ENV: Environment you're building your project for. Values: production, development

  • NODE_PORT: The port on which the backend will run

  • NODE_HOST: Node Host where the backend will run

  • HOST_ADDRESS: Full Host address, used later on for Github callback. Example value: http://api.substrate-starter-kit.com

Database

  • DB_HOST: Host of the database we'll be using

  • DB_PORT: The port of the database

  • DB_NAME: Name of the app database

  • TEST_DB_HOST: Host of the test database used for integration tests

  • TEST_DB_PORT: The port of the test database

  • TEST_DB_NAME: Name of the database used for integration tests

  • DB_DIALECT: Dialect we'll be using for the Database. Value: postgres

  • DB_USER: User that will access the database

  • DB_PASSWORD: Password of the previously mentioned user

HTTP Session

  • COOKIE_SECRET: Secret phrase used for encrypting the session cookie

  • COOKIE_DOMAIN: Domain of our hosting machine

  • COOKIE_HTTP_ONLY: Flag used for preventing 3rd party access to our cookie

  • COOKIE_SECURE: Flag used to enable or disable cookie sending to backend hosted with HTTPS

  • COOKIE_NAME: Name that will be used for identifying the cookie

  • SESSION_TABLE: Name of the table in our database to be used for persisting session

Github

  • The next two fields can be optained by following the guide here

    • GITHUP_APP_CLIENT_ID: ID of our Github OAuth application

    • GITHUB_APP_CLIENT_SECRET: Client secret of our Github OAuth application

  • GITHUB_API_URL: Github REST API URL, Default: https://api.github.com/

  • GITHUB_LOGIN_SUCCESS_REDIRECT_URL: Redirect route for the success page on the Frontend

  • GITHUB_LOGIN_ERROR_REDIRECT_URL: Redirect route for the error page on the Frontend

Last updated