The Setup - ColumbiaJS/js-course GitHub Wiki
◄ Back (Github Workflow) Next (Grading) ►
Table of Contents
First, consider using laptop if you haven't already - it will setup a whole bunch of this for you
- Setup git. Refer to Jae's excellent tutorial and the accompanying recitation
- If you're not on Github, sign up for Github (ask for an educational account so you can get some extra repos).
- Get hub - the command-line wrapper for git: http://hub.github.com/
- Install Node.js (Node.js® is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.) Please note, you can install npm with curl using
curl -L https://npmjs.com/install.sh | shbut you may have to setup the path and other configuration variables. See the README for more on this. - Make sure Node.js has been installed by running
$ node -v - Make sure NPM is also installed (it now comes bundled with node)
$ npm -v
- You can now run the Node REPL (read-eval-print loop) by running
$ node - If you are having issues with running npm and need to run
sudoevery time, as per issue #5, running$ sudo chown -R $USER ~/.npmshould fix it. If this doesn't work, you may also have to run$ sudo chown -R $USER /usr/local/bin. Alternatively, you can install nvm, which manages different versions of node and npm, and which should also fix this problem.
- Install grunt globally using
$ npm install -g grunt-cli - Install bower globally using
$ npm install -g bower - Install yeoman
$ npm install -g yo - Install some angular seed projects:
$ npm install -g generator-angular-fullstackAngularJS Full-Stack generator - Install homebrew
- Install mongodb with homebrew. After installing, you may need to run
$ mkdir -p /data/dbto create the directory mongo will use for its databases. You should then be able to run mongo using$ sudo mongod. - Make sure MongoDB is installed and you can run mongod (you will have to do this under sudo)
If you've gotten hub, create a new project locally and on Github with
$ mcd js // mcd is a shortcut command for mkdir [dirName] && cd [dirName]
$ hub init
$ touch README.md
$ hub add . && hub commit -m "initial commit"
$ hub create [optional_organization_name]/[repo_name] -d "[repo_description]"
$ hub push origin master
Otherwise
- Create a directory
$ mkdir my-new-project && cd $_ - Run yo angular-fullstack
$ yo angular-fullstack [app-name] - Create a git repo with a README
- Create a package.json file with
$ npm init
Optionally
- use the setup to setup your mac.
- Learn about dotfiles.
- Learn vim.
- Get rcm (rc file (dotfile) management)
https://i.cloudup.com/bDkmXyEmr5.png https://cldup.com/Rg6WLgqccB.svg https://cldup.com/0286W-2y27.png https://i.cloudup.com/Ka0R3QvWRs.png https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png https://i.cloudup.com/LYSQDzsBKK.png http://sass-lang.com/assets/img/logos/logo-b6e1ef6e.svg https://cldup.com/P3MQgWdDyG.png https://cldup.com/wpGXm1cWwB.png https://d21ii91i3y6o6h.cloudfront.net/gallery_images/from_proof/1647/small/1405586570/browserify-2-hexagon-sticker.png https://angularjs.org/img/AngularJS-large.png http://sequelizejs.com/images/logo.png http://3.bp.blogspot.com/-FyUpmcdzVUo/U0jcggP0lEI/AAAAAAAAR3c/5c7xie7hy8c/s1600/jshint.png
http://sequelizejs.com/ [Sequelize is an easy-to-use multi sql dialect object-relationship-mapper for node.js. It currently supports MySQL, MariaDB, SQLite, PostgreSQL and MSSQL.](https://github.com/sequelize/sequelize | alt=Sequelize]]
For Windows Users
This course on Pluralsight, which is all about Mongo and Node, is done entirely on a Windows machine, and the second section, "Setting Up the Demo Application", goes through how to set up your machine in detail:
http://www.pluralsight.com/courses/mongoose-for-nodejs-mongodb
This course about WebStorm is also for Windows (although applies to Mac as well) and details the installation process on Windows.