Skip to content

DerDomee/express-blog

Repository files navigation

All of dominikriedig.de

This is the repository with all code for my express-managed webpages using a monolithic master process.

Table of Contents

  1. Build, Start, Develop, Test, Debug
  2. Environment Variables

Build, Start, Develop, Test, Debug

Following core npm scripts are useful when developing:

# Build and start the app
npm run build
npm start

# Start development environment
npm run dev

# Start debuggable development environment
npm run debug

# Run tests (Jest)
npm test

Environment Variables

Here is a list of all impacting environment variables that can be used. Setting a variable to a unallowed value leads to undefined and unexpected behaviours!

Variable Name Default Value Allowed Values Description
App behaviour settings
NODE_ENV - production,
development,
test
Changes database connection behaviour. Should not be set in .env file.
DD_SUBAPP_ENABLED_BLOG
DD_SUBAPP_ENABLED_CMS
DD_SUBAPP_ENABLED_CLOUDCENTER
true boolean Enables/disables a specific subapp.
DD_SUBAPP_HOSTNAME_BLOG
DD_SUBAPP_HOSTNAME_CMS
DD_SUBAPP_HOSTNAME_CLOUDCENTER
- string If NODE_ENV is production, prefixes all subapp-internal and cross-subapp hrefs with https://<HOSTNAME>, else this variable stays unused and the hrefs are prefixed with http://localhost:port instead.
DD_SUBAPP_PORT_BLOG
DD_SUBAPP_PORT_CMS
DD_SUBAPP_PORT_CLOUDCENTER
3000
3001
3002
number Sets the port the subapp should listen on.
Database connection settings
DD_DBHOST
127.0.0.1 string Sets the database host to connect to.
DD_DBUSER
- string Sets the database username.
DD_DBPASS
- string Sets the database password.
DD_DBNAME
- string Sets the database name.
Email Settings
DD_EMAIL_ENABLED
false boolean Enables email send functionality. If this is true, all other email related fields must be filled accordingly.
DD_EMAIL_ADMIN_ADDRESS
- string Email address of the administrator (or webmaster/hostmaster) of the running server.
DD_EMAIL_SUPPORT_ADDRESS
- string Email address of a support endpoint that users can send questions to.
DD_EMAIL_SMTP_SERVER
- string Sets the SMTP Server host to send emails from.
DD_EMAIL_SMTP_PORT
465 number Sets the SMTP port to connect to.
DD_EMAIL_SMTP_USERNAME
- string Set the authenticating username for the SMTP Server.
DD_EMAIL_SMTP_PASSWORD
- string Set the authentication password for the SMTP Server.
DD_EMAIL_FROM
- string Sets the default From: Email-Header. If not set, the SMTP Server might choose the default mail address as the From value or might not work at all, depending on the mail provider.
Variables for internal use only
TW_COMPILE_SUBAPP_NAME - string Only used internally within tailwind-compiling npm scripts. Do never set this!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •