Start with the "Blank" cloud9 template. When it finishes loading, open up the terminal and install the yeoman and the express generator:
npm install -g yo generator-express
Then run the following command to generate the project files:
yo express
Select the "Basic" option, as well as the "Nunjucks" option for the view engine.
Now you have a fully configured express application already. You can run it from the terminal using:
bin/www
Now if you click the Preview button in the top menu in the IDE, and choose "Preview with Web Server", this will open the Preview window for your running app.
In order to make life easier you can create a run configuration for express.
- Click Run -> Run Configurations -> Manage ...
- Click Add New Config
- In the run panel fill in Express as name, bin/www as the command and Node 0.10.x as the runner.
- You can optionally make this run configuration the default runner by clicking Set As Default. If you do so then clicking the run button will always run the app and not the currently opened file.
The finished run configuration should look something like this: