Last active
August 29, 2015 13:56
-
-
Save barnabee/9102930 to your computer and use it in GitHub Desktop.
How to set up Express, MongoDB and Mongoose on a Nitrous.IO NodeJS box.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To install MongoDB: "Autoparts" menu then "Manage Packages", search for MongoDB then | |
click "Install" then when done click "Start". | |
To install Express, in the console type: | |
npm install express -g<ENTER> | |
To create a new app. with folder structure ready to go, in the console type the following: | |
express ~/APPNAME --ejs<ENTER> | |
cd ~/APPNAME<ENTER> | |
npm install<ENTER> | |
To test the app, make sure you're in the directory for your app in the console (if you're | |
not: cd ~/APPNAME will always get you there) then type: | |
node app.js | |
Then to view the test site, click "Preview" (menu) then "Port 3000" - you should see a new tab | |
with the welcome to Express page. | |
To install Mongoose (again from the app. directory - cd ~/APPNAME if needed) type the following: | |
npm install mongoose --save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment