Skip to content

Instantly share code, notes, and snippets.


David Wu davidwwu

View GitHub Profile
davidwwu / Quick-ES6-Setup-Heroku
Last active Apr 27, 2017 — forked from bitgord/Quick-ES6-Setup-Heroku
Quick setup to use ES6 with Heroku
View Quick-ES6-Setup-Heroku
// First download node, create new folder
// Cd into new folder, npm and git init
// Create heroku app
heroku create
// install babel cli (to do compiling), babel presets (to compile the right features), express (web server)
npm install babel-cli babel-preset-es2015 express
// Create file .babelrc and add json
View hostReachable.js
if (typeof networkTest === 'undefined') {
var networkTest = {};
(function() {
this.hostReachable = function() {
// Since we are setting the cache ajax option to false, we can take out the Math.random mechanism
let url = '//' + window.location.hostname;
let status;
You can’t perform that action at this time.