Skip to content

Commit

Permalink
fix: the dev server should start only once and only in web dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Jun 25, 2017
1 parent 3490e16 commit 454eb31
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/cli/core/manager/Manager.js
Expand Up @@ -66,10 +66,6 @@ class Manager {

this.updateStructureAndTemplates()

if (process.env.NODE_ENV === 'development') {
this.initDev()
}

var p = new Promise((resolve) => {
this.getKeysFromSelect()
.then(() => {
Expand Down
3 changes: 2 additions & 1 deletion src/cli/extend/plugins.js
Expand Up @@ -75,7 +75,8 @@ class Plugins {
partials : null,
templates : null,
process : null,
routes : null
routes : null,
custom : null
}

try {
Expand Down
2 changes: 2 additions & 0 deletions src/server/app.js
Expand Up @@ -147,6 +147,8 @@ app.use(middleIsAuthorized)
app.use(middleLogin)
app.use(middleWebsite)
if (process.env.NODE_ENV === 'development') {

Manager.instance.initDev()
process.on('uncaughtException', function (err) {
// We need to trap this error which is sent on websocket client connection
if(err.code !== 'ECONNRESET'){
Expand Down

0 comments on commit 454eb31

Please sign in to comment.