当运行grunt服务时,进程陷入express:dev任务 mongod正在运行并显示
> Running "express:dev" (express) task
> Starting background Express server
> Debugger listening on port 5859
Mongod回复:
2016-12-24T19:50:20.085+0530 I NETWORK [initandlisten] waiting for connections on port 27017
2016-12-24T19:50:36.539+0530 I NETWORK [initandlisten] connection accepted from 127.0.0.1:36894 #1 (1 connection now open)
2016-12-24T19:50:36.572+0530 I NETWORK [initandlisten] connection accepted from 127.0.0.1:36896 #2 (2 connections now open)
我的服务器app.js文件是特此而且我不知道为什么grunt进一步的任务正在执行它是否与端口相关的东西请帮忙?
[/**
* Main application file
*/
'use strict';
// Set default node environment to development
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var express = require('express');
var mongoose = require('mongoose');
var config = require('./config/environment');
// Connect to database
mongoose.connect(config.mongo.uri, config.mongo.options);
// Populate DB with sample data
// if(config.seedDB) { require('./config/seed'); }
// Setup server
var app = express();
var server = require('http').createServer(app);
var socketio = require('socket.io')(server, {
serveClient: (config.env === 'production') ? false : true,
path: '/socket.io-client'
});
require('./config/socketio')(socketio);
require('./config/express')(app);
require('./routes')(app);
// Start server
server.listen(config.port, config.ip, function () {
//console.log('Express server listening on %d, in %s mode', config.port, app.get('env'));
});
// Expose app
exports = module.exports = app;][1]