Well after some thought, I figured it was time to roll up my sleeves and install some tools and frameworks to start with my minimilist IoT playground. I use macOS and will focus just on that.
Environment under macOS
I first started to go down the path provided at mean.io and felt there was too much of a heavy lift for a newbie trying to ramp up on four technologies at the same time. I opted for installing each of them by hand so I can see the type of problems can occur.
I installed the following:
$ brew install mongodb --with-openssl $ sudo mkdir /data/dbmd $ whoami youraccount $ sudo chown youraccount /data/db # Default no authentication required so user beware. # launch mongodb $ mongodb
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash $ nvm install node $ nvm ls # list of node versions installed $ nvm $ nvm alias default 7.8.0 # I want to keep version 7.8.0 as default
If the NVM is too much of a hassle, get node directory from node.js via download
Node.js – It is already newer than the version I have (7.8.0). This is an easy install and should not pose any problems
Express Generator – another straight forward install for light weight web framework
$ npm install -g express-generator # change to a directory where you want to install the express templates. e.g. min is chrapchp/Dev/nodes $ express HomeSensors # what I called my app $ cd HomeSensors $ npm install
I installed the following as well based on what I thought I needed for this learning exercise.
|log4js||log4js||log4js based logging services for node.js||npm install log4js -S|
|monk||monk||wrapper to mongodb that is simpler yet not as powerful as mongoose||npm install monk -S|
|nodemon||nodemon||listens for file changes and restarts server||npm install nodemon -g|
|dummy-json||dummy-son||tool to generate JSON files used for my testing||npm install dummy-json -g|
|Robomongo||robomongo||MongoDB manager||download and point to mongoDB instance (default localhost:27017)|
|Bluebird||bluebird||promise library implementation||npm install bluebird -S|
|SerialPort||serial port||serial port driver for node.js||npm install serialport -S # have 4.0.7|
|xbee-api||xbee-api||xbee API for node.js||npm install xbee-api -S|
Off to learning this stuff.