Skip to content

Commit

Permalink
fix(server): path to .env and launch on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraS authored and Bouncey committed Oct 9, 2018
1 parent 6fb3b05 commit a426d85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions api-server/development-entry.js
Expand Up @@ -4,9 +4,12 @@ const nodemon = require('nodemon');
nodemon({
ext: 'js json',
// --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'),
spawn: true
spawn: true,
env: {
DEBUG: 'fcc*'
}
});

nodemon.on('restart', function nodemonRestart(files) {
Expand Down
2 changes: 1 addition & 1 deletion api-server/package.json
Expand Up @@ -5,7 +5,7 @@
"private": true,
"main": "development-entry.js",
"scripts": {
"babel-dev-server": "babel-node ./server/server.js",
"babel-dev-server": "babel-node --inspect ./server/server.js",
"commit": "git-cz",
"commitmsg": "validate-commit-msg",
"ensure-env": "node ./config/ensure-env.js",
Expand Down
4 changes: 1 addition & 3 deletions api-server/server/server.js
@@ -1,7 +1,5 @@
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../.env')});

console.log(path.resolve(__dirname, '../.env'))
require('dotenv').config({ path: path.resolve(__dirname, '../../.env')});

const _ = require('lodash');
const Rx = require('rx');
Expand Down

0 comments on commit a426d85

Please sign in to comment.