Reputation: 4872
I have just started using keystoneJS and am trying to start my server with grunt. The problem is that the server starts normally and immediately terminates.
Why is that?
here is console log:
C:\Users\xxx\Desktop\xx>grunt express
Running "express:dev" (express) task
Starting background Express server
debugger listening on port 5858
------------------------------------------------
KeystoneJS Started:
xxx is ready on port 3000
------------------------------------------------
Done, without errors.
Execution Time (2014-10-25 21:13:11 UTC)
loading tasks 64ms ■■ 2%
express:dev 4s ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 98%
Total 4.1s
Upvotes: 0
Views: 1098
Reputation: 24617
Use the following process:
Use another port rather than 5858 as the debugger port
var express = require('express');
var app = express();
app.listen(9998);
Use another port rather than 3000 as the KeystoneJS port
keystone.set('port', 9999)
Use keepalive:
nohup grunt connect::keepalive & #Linux
Start-Process grunt connect::keepalive #Windows
References
Upvotes: 1