I'm currently playing around with Yeoman Angular Fullstack Generator. That's pretty cool and works as expected. Since it uses grunt, it's possible to run grunt serve dist
so that it starts the server with my uglified and concatenated files...
BUT:
Last week I found modulus.io (nodejs cloud hosting like heroku) and they were offering a free evaluation phase. Problem: They expect that my project has an app.js so they can start it with node app.js
.
Question:
Do you guys know how can I use grunt to generate a dist folder just for modulus.io, including all contents of the already generated dist folder (currently just frontend code) + all needed server-side javascripts + an appropriate app.js (that uses express and the contents from the dist folders) and the package.json file?
Any help would be appreciated. :) I think a similar task must exist somewhere since you might have this problem on any other cloud hosting platform. Unfortunately I couldn't find a proper solution
Regards,
Sascha
In short, modulus.io is just looking for an entry-point into the application. It can be called whatever you like, so long as in your package.json
file you have a line that tells it what to launch, ie. "main": "dist/app.js"
.
See: https://modulus.io/codex/projects/app-guidelines for more info.
The full stack generator that you are using should have generated all this for you however...?
EDIT: Running a simple grunt
command will create a \dist
directory that is ready to be uploaded.