mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 15:47:48 +01:00
change 'prod' to 'production',
This commit is contained in:
2
app.js
2
app.js
@@ -28,7 +28,7 @@ const auth = require('./routes/auth');
|
||||
app.use('/api/lists', auth.required, require('./routes/lists'));
|
||||
app.use('/api/todos', auth.required, require('./routes/todos'));
|
||||
|
||||
if (process.env.NODE_ENV === 'prod') {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
app.use(express.static(path.join(__dirname, 'react/build')));
|
||||
app.use('*', express.static(path.join(__dirname, 'react/build/index.html')));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const env = process.env.NODE_ENV;
|
||||
|
||||
const prod = {
|
||||
const production = {
|
||||
app: {
|
||||
port: process.env.PORT,
|
||||
},
|
||||
@@ -10,7 +10,7 @@ const prod = {
|
||||
secret: process.env.SECRET,
|
||||
};
|
||||
|
||||
const dev = {
|
||||
const development = {
|
||||
app: {
|
||||
port: process.env.DEV_PORT || 4000,
|
||||
},
|
||||
@@ -25,9 +25,9 @@ const test = {
|
||||
};
|
||||
|
||||
const config = {
|
||||
prod,
|
||||
dev,
|
||||
production,
|
||||
development,
|
||||
test,
|
||||
};
|
||||
|
||||
module.exports = config[env] || config.prod;
|
||||
module.exports = config[env] || config.production;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"start": "node ./app.js",
|
||||
"debug": "cross-env NODE_ENV=dev npx nodemon --inspect ./app.js",
|
||||
"debug": "cross-env NODE_ENV=development npx nodemon --inspect ./app.js",
|
||||
"test": "cross-env NODE_ENV=test jest",
|
||||
"postinstall": "cd react && npm install && npm run build"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user