Skip to content

Instantly share code, notes, and snippets.

// Requires NodeJS and "noble" module: https://github.com/sandeepmistry/noble
// Based on: https://github.com/sandeepmistry/noble/issues/62
var noble = require('noble');
noble.on('stateChange', function(state) {
if (state === 'poweredOn' ) {
noble.startScanning([], false);
} else {
noble.stopScanning();
}

#Install Debian on the Beaglebone Black, along with Go 1.4

##Ingredients:

  1. Internet connected computer running Mac OS X (you may substitute some other Unix/Linux box---you'll need enough disk space to hold the Debian image (about 2GB), the ability to fetch content from the Internet, uncompress xz files, and the ability to write the image to a connected MicroSD card)

  2. MicroSD card (> 4GB recommended)

var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');