fnakstad / angular-client-side-auth

One way to implement authentication/authorization in Angular applications
http://angular-client-side-auth.herokuapp.com/
MIT License
1.63k stars 346 forks source link

Having troubles deploying to Heroku #73

Open m1ket opened 10 years ago

m1ket commented 10 years ago

Hello,

I'm a bit of a newbie to NodeJS and AngularJS.

I have tried deploying your code to Heroku, but my app keeps crashing. I can't get it to start. Does this error message mean anything to you?

2014-04-28T11:46:38.029698+00:00 heroku[api]: Release v8 created by ***@gmail.com 2014-04-28T11:46:42.698447+00:00 heroku[web.1]: Starting process with command node server.js 2014-04-28T11:46:43.956516+00:00 app[web.1]: /app/node_modules/express/lib/application.js:172 2014-04-28T11:46:43.956170+00:00 app[web.1]: 2014-04-28T11:46:43.956844+00:00 app[web.1]: if ('function' != typeof fn) throw new Error('callback function required'); 2014-04-28T11:46:43.956850+00:00 app[web.1]: ^ 2014-04-28T11:46:43.958801+00:00 app[web.1]: Error: callback function required 2014-04-28T11:46:43.958803+00:00 app[web.1]: at Function.app.engine (/app/node_modules/express/lib/application.js:172:38) 2014-04-28T11:46:43.958805+00:00 app[web.1]: at Object. (/app/server.js:9:5) 2014-04-28T11:46:43.958807+00:00 app[web.1]: at Module._compile (module.js:449:26) 2014-04-28T11:46:43.958809+00:00 app[web.1]: at Object.Module._extensions..js (module.js:467:10) 2014-04-28T11:46:43.958811+00:00 app[web.1]: at Module.load (module.js:356:32) 2014-04-28T11:46:43.958812+00:00 app[web.1]: at Function.Module._load (module.js:312:12) 2014-04-28T11:46:43.958814+00:00 app[web.1]: at Module.runMain (module.js:492:10) 2014-04-28T11:46:43.958816+00:00 app[web.1]: at process.startup.processNextTick.process._tickCallback (node.js:245:9) 2014-04-28T11:46:45.188195+00:00 heroku[web.1]: Process exited with status 1 2014-04-28T11:46:45.203559+00:00 heroku[web.1]: State changed from starting to crashed

fnakstad commented 10 years ago

Hmmm, the error trace isn't very descriptive... The example app is also running on Heroku, so the first thing that comes to mind is that if you're using social logins maybe you didn't set the environment variables in Heroku yet? The expected environment variables can be found on the front page for this repo, while the Heroku documentation has a section on how to set these environment variables for your Heroku app. Let me know if you figure it out :)