* Added placeholder text to site when loading JS
* Added hidden text to site for scraping * Login token will be destroyed if fetch site totals is called and the token is bad * Moved passwords out of application and into a .env file that is loaded on startup * Changed prod database password for primary user (which is dev) * Set up .env for dev and prod
This commit is contained in:
1 parent
3535f0cb24
commit
278b204b3b
8 files changed
+61
-19
No files matched your search
+7
-1
@@ -1,11 +1,17 @@
|
||||
//Set up environmental variables, pulled from .env file used as process.env.DB_HOST
|
||||
const os = require('os') //Used to get path of home directory
|
||||
const result = require('dotenv').config({ path:(os.homedir()+'/.env') })
|
||||
|
||||
//Allow user of @ in in require calls. Config in package.json
|
||||
require('module-alias/register')
|
||||
|
||||
//Auth helper, used for decoding users web token
|
||||
let Auth = require('@helpers/Auth')
|
||||
|
||||
//Helmet adds additional security to express server
|
||||
const helmet = require('helmet')
|
||||
|
||||
|
||||
//Setup express server
|
||||
const express = require('express')
|
||||
const app = express()
|
||||
app.use( helmet() )
|
||||
|
||||
Reference in new issue
Block a user