diff --git a/.env b/.env new file mode 100644 index 0000000..11fe771 --- /dev/null +++ b/.env @@ -0,0 +1,23 @@ +# The database URIs. Contains authentication. +# See https://mongoosejs.com/docs/connections.html#connections for details. +DB="mongodb://localhost/helios" +DB_OPTS="{"useNewUrlParser": true}" + +# The ports to run Helios on. (Set HTTP to -1 to not not listen to HTTP at all - +# HSTS recommended in this case) +PORT_HTTP=80 +PORT_HTTPS=443 + +# CURRENTLY NOT USED! - https://git.coolaj86.com/coolaj86/greenlock-express.js/issues/26 +BIND_IP="0.0.0.0" + +# Host on these domains. The first domain will be your primary, canonical URL. +# Helios will only issue a certificate valid for these domains. +BIND_DOMAINS="localhost" + +SSL="none" +AGREE_GREENLOCK_TOS=false + +MAIL="webmaster@localhost.local" + +# TODO: Some sort of canonical port for NAT? diff --git a/.gitignore b/.gitignore index 42fdfa4..b8779b3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ node_modules # Ignore config files, certs, ... config/**/ config/style.sass -.env +.env.local diff --git a/server/index.js b/server/index.js index 3bdbbfe..7e107cd 100644 --- a/server/index.js +++ b/server/index.js @@ -1,4 +1,8 @@ -const dotenv = require("dotenv").config(); +// Invert env varibles first +const dotenv = require("dotenv"); +dotenv.config({ path: ".env.local" }); +dotenv.config({ path: ".env" }); +// Load libraries const log = require("./log"); const axios = require("axios"); const path = require("path");