Mac OSX Switch Java Version

/usr/libexec/java_home -V this will list all the Java Versions on the machine select the specific version using: export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_125` or just specify the major number export JAVA_HOME=`/usr/libexec/java_home -v 1.8` Now run java -version


Create a Maven Project

In this example we will create an empty Maven Java Project. Install Dependencies Install Java Install Maven Install IDE Eclipse Netbeans Intellij IDEA Create Maven Project Intellij IDE Step 1 Open Intellij IDE Step 2 Create New Project Maven leave Create from archetype unchecked Next Step 3 GroupId: -e.g. ArtifactId: - e.g. MyProject Version: 1.0-SNAPSHOT … Continue reading Create a Maven Project

JavaScript: Variables (ES6)

Setup Project mkdir /Fundamentals cd Fundamentals npm init defaults npm install --save-dev babel-cli npm install --save-dev babel-preset-es2015 babel-preset-stage-2 touch variables.js atom . package.json { "name": "Fundamentals", "version": "1.0.0", "description": "", "main": "variables.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "nodemon variables.js --exec babel-node --presets es2015,stage-2" }, "author": "", "license": "ISC", … Continue reading JavaScript: Variables (ES6)

NodeJS & MongoDB – create simple API

Setup Project mkdir <projectdir>/helloworld cd helloworld npm init name: version: description: Hello World API entry point: server.js test command: git repository: keywords: author: John Dunning license: npm install --save express body-parser mongoose bluebird npm install -g nodemon atom . Create server.js Create Model open Atom create folders  app app/model app/model/person.js Start MongoDB mongod Start the … Continue reading NodeJS & MongoDB – create simple API

NodeJS & MongoDB Development Environment

Atom IDE Download Unzip and drag to installation location Open Atom Menu Bar -> Atom -> Install Shell Commands Open a terminal session atom . (opens atom in the current working directory) Menu Bar -> Atom Preferences Install -> Search and click Packages to find and install atom-beautify atom-jade json-converter jsonlint linter language-babel pretty-json … Continue reading NodeJS & MongoDB Development Environment