25 3 / 2012
New Nodester-CLI Fixes Windows Git Issue
Update your CLI by running “npm install nodester-cli -g” and Windows users will find that their git issues on nodester app init have been resolved!
The main change in the update is that Windows uses && to join multiple commands together whereas Mac and Linux use semicolons. We had a long string of commands that changed into the new app directory and did a “git add .” followed by a “git commit” and “git push”. We were not properly breaking these commands up on Windows machines hence the initial app failing to start because the code was not added to the git repo properly to push to Nodester.
Hope this helps :)
25 3 / 2012
Tips for Windows Users
Installing Node.JS apps on Nodester using Windows was slightly different that the steps for Mac and Linux users. Last night, I used Bootcamp on my Mac to walk through installing Node.JS as an MSI on Windows 7 and installing the Nodester-CLI and deploying the “hello world” app. My recap is below:
- Download and install Node.JS by clicking on the Download and Windows links on http://nodejs.org. Next reboot your PC to get the paths working to run Node. (There is probably an easier way to do this but I am slightly Windows challenged ;)
- Install Git for Windows and generate your RSA key using GitHub’s instructions here: http://help.github.com/win-set-up-git/
- Rather than using the Windows CMD prompt, I had much better results using the Git Bash prompt on Windows for the remainder of these steps.
- Install Nodester-CLI by running:
npm install nodester-cli -g
- Link the CLI to your Nodester account by running:
nodester user setup yourusername yourpassword
- Submit your RSA key to Nodester so that your git commands work as follows:
nodester user setkey
- Create and deploy your first Node.JS “hello world” app on Nodester using the following 2 commands:
nodester app create mycoolnewappname
nodester app init mycoolnewappname
- This created a new app directory for me and a git repo but the CLI failed to add the new nodester files (server.js and package.json) to my git repo and thus failed to push files to Nodester (because they were not added to git.) I manually added these files to git and pushed and the app came up as expected. Here were the steps that I used:
git add .
git commit -m “initial commit”
git push origin master
If everything worked for you as it did for me, your new Node.JS application should now be running online at: mycoolnewappname.nodester.com
Special thanks to Nirahiel for helping us troubleshoot our CLI on Windows!