Installing nodejs on Mac os X

Steps

  • download and run the nodejs installer
  • the completion/summary screen suggests one check the path
  • make a directory ANYWHERE YOU WANT. I called mine helloword_server.js. Then call it from the command line like #node /mypath/github_repo_of_mine/helloworld_server.js
    • Then it tells you what web address and port to point to and …
    • on http://localhost:1337 … IT WORKS!

The sample code was from the install website

[js]

var http = require(‘http’);
http.createServer(function (req, res) {
res.writeHead(200, {‘Content-Type’: ‘text/plain’});
res.end(‘Hello World\n’);
}).listen(1337, ‘127.0.0.1’);
console.log(‘Server running at http://127.0.0.1:1337/’);

[/js]

My plans are to use angularjs x-extendable for editing tables in place, SQL Server and some sort of IDE which I am researching now. I am leaning towards netbeans and/or visual studio 2013 express.

Here is a angularjs getting started for mvc (aspx MVC5) tutorial kind of irrelevant at this point – but … a good link)

Package install for nodejs (best practices – super resource and another – tutorials and such). Here are the ones I have installed thus far. As I am reading the tutorials (absolute beginners guide), I see this has to be done for every application you write. Interesting – it installs files INTO a node_modules folder. Good thing I cd’ed into the directory before I began.

  • npm install express –save
  • npm install mssql
  • npm install dot (a template)
  • (the following were done after I installed netbeans 8.0.1 and went through this tutorial – it didn’t quite work at 1st – so do these 3 lines and it will work)
    • download git from http://git-scm.com/downloads
    • npm install bower
    • npm install gulp-util
    • then restart netbeans
    • I noticed like the article said, that I had to right mouse click and resolve problems and on my 5th run at things – (and a download of git -which is why I put it up there and not down here) it worked.
  • click play in Netbeans and it prompts the next steps to install a chrome plug in. I had to restart Chrome.
  • bower install angular-xeditable (note good thing bower was installed !!!)
    • added in the two <script>… links they suggested into bower_components/html5_boilerplate/index.html
  • npm install tedious

  • Strong loop / Loopback.io (here are some better instructions)
    • all sorts of issues on windows – on a mac – all i had missing was command line tools
    • install compiler tools
    • mac (I am already playing with it on my mac while the VS 2013 installeris still running):
      • start xcode (download it from app store and go for a long lunch if you don’t).
      • click on menu xcode->preferences, click on download tab, click the circle/down-arrow to install command line tools
    •  windows
    • npm install -g strongloop (you need to prefix this with ‘sudo ‘ in front if it is a mac)