{"action":"created","issue":{"url":"https://api.github.com/repos/gimm/gulp-express/issues/26","labels_url":"https://api.github.com/repos/gimm/gulp-express/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/gimm/gulp-express/issues/26/comments","events_url":"https://api.github.com/repos/gimm/gulp-express/issues/26/events","html_url":"https://github.com/gimm/gulp-express/issues/26","id":57833364,"number":26,"title":"Error using Express generator","user":{"login":"hydrotik","id":157727,"avatar_url":"https://avatars.githubusercontent.com/u/157727?v=3","gravatar_id":"","url":"https://api.github.com/users/hydrotik","html_url":"https://github.com/hydrotik","followers_url":"https://api.github.com/users/hydrotik/followers","following_url":"https://api.github.com/users/hydrotik/following{/other_user}","gists_url":"https://api.github.com/users/hydrotik/gists{/gist_id}","starred_url":"https://api.github.com/users/hydrotik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydrotik/subscriptions","organizations_url":"https://api.github.com/users/hydrotik/orgs","repos_url":"https://api.github.com/users/hydrotik/repos","events_url":"https://api.github.com/users/hydrotik/events{/privacy}","received_events_url":"https://api.github.com/users/hydrotik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-02-16T17:47:25Z","updated_at":"2015-02-18T23:00:21Z","closed_at":"2015-02-18T23:00:21Z","body":"I am getting an error when trying to use this with an express generator created project. I've tried multiple options but it seems to be centered around this line:\r\n\r\nserver.run(['DEBUG=dsgstyleguide:* ./bin/www']);\r\n\r\nI've also taken out the args, etc. and it still doesn't seem to work. maybe i need to cwd first? didn't see an example of that in the closed ticket either. https://github.com/gimm/gulp-express/issues/23\r\n\r\nin gulpfile I have:\r\n```javascript\r\nvar gulp = require('gulp');\r\nvar server = require('gulp-express');\r\n \r\ngulp.task('server', function () {\r\n    // Start the server at the beginning of the task \r\n    server.run(['DEBUG=dsgstyleguide:* ./bin/www']);\r\n    \r\n    // Restart the server when file changes \r\n    gulp.watch(['views/**/*.hbs'], server.notify);\r\n    gulp.watch(['scss/**/*.scss'], ['styles:scss']);\r\n    //gulp.watch(['{.tmp,app}/styles/**/*.css'], ['styles:css', server.notify]); \r\n    //Event object won't pass down to gulp.watch's callback if there's more than one of them. \r\n    //So the correct way to use server.notify is as following: \r\n    gulp.watch(['{.tmp,app}/public/stylesheets/**/*.css'], function(event){\r\n        gulp.run('styles:css');\r\n        server.notify(event);\r\n        //pipe support is added for server.notify since v0.1.5,  \r\n        //see https://github.com/gimm/gulp-express#servernotifyevent \r\n    });\r\n    \r\n    gulp.watch(['public/scripts/**/*.js'], ['jshint']);\r\n    gulp.watch(['public/images/**/*'], server.notify);\r\n    gulp.watch(['app.js', 'routes/**/*.js'], [server.run]);\r\n});\r\n```\r\n\r\nAnd in my app.js I have:\r\n```javascript\r\n// ...More code above\r\nvar routes = require('./routes/index');\r\nvar users = require('./routes/users');\r\n\r\nvar app = module.exports.app = exports.app = express();\r\napp.use(require('connect-livereload')());\r\n\r\n// view engine setup\r\napp.set('views', path.join(__dirname, 'views'));\r\napp.set('view engine', 'hbs');\r\n// More code below...\r\n```\r\n\r\nalso wasn't sure if you could pass npm start in server.run. Thanks for the help!"},"comment":{"url":"https://api.github.com/repos/gimm/gulp-express/issues/comments/74967146","html_url":"https://github.com/gimm/gulp-express/issues/26#issuecomment-74967146","issue_url":"https://api.github.com/repos/gimm/gulp-express/issues/26","id":74967146,"user":{"login":"hydrotik","id":157727,"avatar_url":"https://avatars.githubusercontent.com/u/157727?v=3","gravatar_id":"","url":"https://api.github.com/users/hydrotik","html_url":"https://github.com/hydrotik","followers_url":"https://api.github.com/users/hydrotik/followers","following_url":"https://api.github.com/users/hydrotik/following{/other_user}","gists_url":"https://api.github.com/users/hydrotik/gists{/gist_id}","starred_url":"https://api.github.com/users/hydrotik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydrotik/subscriptions","organizations_url":"https://api.github.com/users/hydrotik/orgs","repos_url":"https://api.github.com/users/hydrotik/repos","events_url":"https://api.github.com/users/hydrotik/events{/privacy}","received_events_url":"https://api.github.com/users/hydrotik/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T23:00:21Z","updated_at":"2015-02-18T23:00:21Z","body":"Happy New Year and no rush. Thank you for your help and let me know when you have some updates I can look at. Hopefully I gave you enough info in the meantime. Cheers!"}}