fix(server): path to .env and launch on Windows

This commit is contained in:
ValeraS
2018-10-08 12:58:56 +03:00
committed by Stuart Taylor
parent 6fb3b0503e
commit a426d85c81
3 changed files with 7 additions and 6 deletions

View File

@ -4,9 +4,12 @@ const nodemon = require('nodemon');
nodemon({ nodemon({
ext: 'js json', ext: 'js json',
// --silent squashes an ELIFECYCLE error when the server exits // --silent squashes an ELIFECYCLE error when the server exits
exec: 'DEBUG=fcc* npm run --silent babel-dev-server', exec: 'npm run --silent babel-dev-server',
watch: path.resolve(__dirname, './server'), watch: path.resolve(__dirname, './server'),
spawn: true spawn: true,
env: {
DEBUG: 'fcc*'
}
}); });
nodemon.on('restart', function nodemonRestart(files) { nodemon.on('restart', function nodemonRestart(files) {

View File

@ -5,7 +5,7 @@
"private": true, "private": true,
"main": "development-entry.js", "main": "development-entry.js",
"scripts": { "scripts": {
"babel-dev-server": "babel-node ./server/server.js", "babel-dev-server": "babel-node --inspect ./server/server.js",
"commit": "git-cz", "commit": "git-cz",
"commitmsg": "validate-commit-msg", "commitmsg": "validate-commit-msg",
"ensure-env": "node ./config/ensure-env.js", "ensure-env": "node ./config/ensure-env.js",

View File

@ -1,7 +1,5 @@
const path = require('path'); const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../.env')}); require('dotenv').config({ path: path.resolve(__dirname, '../../.env')});
console.log(path.resolve(__dirname, '../.env'))
const _ = require('lodash'); const _ = require('lodash');
const Rx = require('rx'); const Rx = require('rx');