Skip to content

ENV variable reference.

Captain Snowball edited this page Oct 29, 2022 · 2 revisions

Env variables are self explanatory, here is list of each env variable and what it does.

  • APP_NAME- String, required, It is name of the application, used in mails.
  • HOST - String, required, Hostname where app runs, for most people it should be set to localhost, you can also set 0.0.0.0 (Only if you know what you are doing)
  • PORT- Number, required, max: 65536, port on which the service runs, use default 3000 or whatever you want.
  • NODE_ENV- String, required, enum: development, production and test.
  • APP_KEY - String, required, random app key for encrypting tokens and signed URLs. I suggest using crypto.randomBytes(32).toString('hex') to generate a random string and use it,
  • CACHE_VIEWS - Boolean, required, Whether views should be cached or not, Views are used for generating code so I suggest don't cache them. _ UI_URL - String, required, URL where frontend is hosted, Used in emails
  • AUTO_VERIFY_EMAIL - Boolean, required, When it is set to true emails are automatically verified, Should always be set to true if you haven't setup correct SMTP details
  • DB_CONNECTION - Required, enum: mysql.
  • DB_DEBUG - Optional, boolean, Set to true if you want to log the queries to the console.
  • MYSQL_HOST - Self explainatory.
  • MYSQL_PORT - Self explainatory.
  • MYSQL_USER - Self explainatory.
  • MYSQL_PASSWORD: Self explainatory.
  • MYSQL_DB_NAME: Self explainatory.
  • PROJECT_PATH: Required, string, where generated code should be stored, I have been using ../Projects so far and works without any issue but you are free to store generated projects at any location as long as the folder is not inside a git project because generate code creates a new git repository and using it inside any other repository doesn't work.
  • MAIL_FROM_ADDRESS - String, required, Sender email address,
  • SMTP_HOST - Self explainatory
  • SMTP_PORT - Self explainatory.
  • SMTP_USERNAME - Self explainatory.
  • SMTP_PASSWORD - Self explainatory.
  • REDIS_CONNECTION - String, required, enum: local,
  • REDIS_HOST - Self explainatory.
  • REDIS_PORT - Self explainatory.
  • REDIS_PASSWORD - Self explainatory.
  • ENABLE_HOSTING Optional, boolean, Hosting is an experimental feature (I know 😏, this entire project is experimental then this is experimentalception).
  • HOSTING_UI_DOMAIN - Optional, string. If you have a domain where UI should be hosted, let's say domain is hosted-ui.example.com then UI will be hosted on something like http://hosted-ui.example.com:1223 where 1223 represents port number, it will be random.
  • HOSTING_API_DOMAIN - Same as HOSTING_UI_DOMAIN but for API,
  • ROOT_MYSQL_HOST - Hosted projects needs a database, this is hostname for that database.
  • ROOT_MYSQL_PORT - Hosted projects needs a database, this is port for that database.
  • ROOT_MYSQL_PASSWORD - Hosted projects needs a database, this is password for that database, user is root, no other user is allowed creating users.
  • STRIPE_SECRET_KEY - String, required, During development I was planning to make it a paid project, this is stripe key, you can put it if you want to use payment system, random key works fine as long as you don't use pay button
  • GIT_REPO_API_ADONIS - Required, stirng, API is created from a base project, if you want to add some extra dependencies in your base project then form https://github.com/SecureSnowball/creator_adonis_api_starter and add it here.
  • GIT_REPO_WEB_ADONIS - Required, stirng, SSR UI is created from a base project, if you want to add some extra dependencies in your base project then form https://github.com/SecureSnowball/creator_adonis_web_starter and add it here.
  • GIT_REPO_SPA_VUE_BUEFY - Required, stirng, SPA UI is created from a base project, if you want to add some extra dependencies in your base project then form https://github.com/SecureSnowball/creator_vue_spa_starter_next and add it here.

Clone this wiki locally