{"action":"created","issue":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/487","repository_url":"https://api.github.com/repos/nightwatchjs/nightwatch","labels_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/487/labels{/name}","comments_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/487/comments","events_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/487/events","html_url":"https://github.com/nightwatchjs/nightwatch/issues/487","id":83334684,"number":487,"title":"How to configure nightwatch with expressjs app","user":{"login":"lgaticaq","id":661958,"avatar_url":"https://avatars.githubusercontent.com/u/661958?v=3","gravatar_id":"","url":"https://api.github.com/users/lgaticaq","html_url":"https://github.com/lgaticaq","followers_url":"https://api.github.com/users/lgaticaq/followers","following_url":"https://api.github.com/users/lgaticaq/following{/other_user}","gists_url":"https://api.github.com/users/lgaticaq/gists{/gist_id}","starred_url":"https://api.github.com/users/lgaticaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgaticaq/subscriptions","organizations_url":"https://api.github.com/users/lgaticaq/orgs","repos_url":"https://api.github.com/users/lgaticaq/repos","events_url":"https://api.github.com/users/lgaticaq/events{/privacy}","received_events_url":"https://api.github.com/users/lgaticaq/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-01T06:03:53Z","updated_at":"2016-03-02T21:47:24Z","closed_at":"2015-06-23T20:32:28Z","body":"This is my server\r\n\r\n```js\r\n// server/server.js\r\n'use strict'\r\n\r\nconst express = require('express')\r\nconst config = require('./config')\r\nconst mongoose = require('mongoose')\r\n// require('env-newrelic')()\r\n\r\nmongoose.connect(config.db)\r\n\r\nconst app = express()\r\nconst server = require('http').createServer(app)\r\nconst socketio = require('socket.io')(server, {\r\n  serveClient: (config.env === 'production') ? false : true,\r\n  path: '/socket.io-client'\r\n})\r\n\r\nrequire('./config/socketio')(socketio)\r\nrequire('./config/express')(app)\r\nrequire('./routes')(app)\r\n\r\nserver.listen(config.port, function () {\r\n  console.log(`Express app started on port ${config.port}`)\r\n})\r\n\r\nexports = module.exports = app\r\n```\r\nThis is my test\r\n```js\r\n// tests/test.js\r\n'use strict'\r\n\r\nrequire('../server/server.js')\r\n\r\nmodule.exports = {\r\n  'Server: Title Test' : function (client) {\r\n    client\r\n      .url('http://localhost:3000')\r\n      .assert.title('amulen-core')\r\n      .end()\r\n  }\r\n}\r\n```\r\nWhen I run the test does not complete the task, that is due to the callback but as I fix?\r\n```shell\r\n[Server] Test Suite\r\n===================\r\nExpress app started on port 3000\r\n\r\nRunning:  Server: Title Test\r\n ✔ Testing if the page title equals \"amulen-core\".\r\n\r\nOK. 1 assertions passed. (2.958s)\r\n\r\n^C\r\n```"},"comment":{"url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/comments/191447585","html_url":"https://github.com/nightwatchjs/nightwatch/issues/487#issuecomment-191447585","issue_url":"https://api.github.com/repos/nightwatchjs/nightwatch/issues/487","id":191447585,"user":{"login":"eyalw","id":608669,"avatar_url":"https://avatars.githubusercontent.com/u/608669?v=3","gravatar_id":"","url":"https://api.github.com/users/eyalw","html_url":"https://github.com/eyalw","followers_url":"https://api.github.com/users/eyalw/followers","following_url":"https://api.github.com/users/eyalw/following{/other_user}","gists_url":"https://api.github.com/users/eyalw/gists{/gist_id}","starred_url":"https://api.github.com/users/eyalw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyalw/subscriptions","organizations_url":"https://api.github.com/users/eyalw/orgs","repos_url":"https://api.github.com/users/eyalw/repos","events_url":"https://api.github.com/users/eyalw/events{/privacy}","received_events_url":"https://api.github.com/users/eyalw/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T21:47:24Z","updated_at":"2016-03-02T21:47:24Z","body":"+1 on @mmahalwy question"}}