Nodester.com home

29 12 / 2011

Deploying an Existing Node.JS App to Nodester

Do you have an existing Node.JS application and a Nodester Node.JS hosting account? Cool! Let’s walk through getting that app deployed for you.

1. Open your command line and cd into your app directory

2. Run “nodester app create <appname>”. (Note: If your starting javascript file is NOT server.js, add its name after the appname on the create command)

3. Update your app’s port address to match the one we assigned via the create app command. (Note: If your app uses websockets, set your client app to use port 80.)

4. Run “nodester app info <appname>”

5. Assuming you already have a git repo, add a nodester remote by running “git remote add nodester <git repo from info command>”.  If you do not have a git repo already, first run “git init” followed by “git add .” and git commit -m “initial commit”

6. Run “git push nodester master”.  This will push and run your existing app to Nodester where it can be reached at http://<appname>.nodester.com.

Does your application use any NPM modules?  If so, you will need to install them to your app’s sandbox and restart your application using the following commands:

7. Run “nodester npm install <appname> <module>”

8. Run “nodester app restart <appname>”

Subsequent git pushes update your Nodester app and restarts it automatically for you. Easy as that :)

05 2 / 2011

How to deploy a Node.js application on Nodester!