I also use yeoman with Angular Fullstack. It's almost funny how these tools come so close to working but leave you, the developer stuck when it comes to deploying. This isn't actually an answer. It's more of a supportive post acknowledging the problem. Here is what I've discovered.
- Yeoman likes you to run grunt serve:dist to get a peek at what the minified build will look like. This puts all your production code into /dist/public
- Nodejitsu will run node server/app.js when it runs
- Unfortunately, this leaves nodejitsu looking in dist instead of dist/public so it can't find the files
------SEE BELOW FOR A BETTER ANSWER------
I've been playing with this more and as it turns out, the answer is almost too easy, especially with nodejitsu. I'm going to assume that you've already installed the nodejitsu tools with:
[sudo] npm install jitsu -g
I'll also assume you've registered as described here:
https://www.nodejitsu.com/documentation/jitsu/
Now, it's really easy.
- Run
grunt
. This will minify and uglify your code. I had some problems with uglify (as many people seem to have) and so I added this to Gruntfile.js to fix the issue. Apparently the js is larger as a result but the headache factor is worth it for me:
Add it within the initConfig section (only take this step if you are getting an error related to loading modules from the console of your browser).
// Uglify Exceptions
uglify: {
options: {
mangle: false
}
},
Running grunt puts everything into /dist/public.
Now
Everything worked perfectly for me. The key here is being inside the dist dir when you run jitsu deploy. This way, it will only deploy the production compiled code.