Mongo
Mongo
Prerequisites
The user must know how to connect to an Intel Edison and set up a wifi connection.
Basic Linus shell commands knowledge.
Mongo in Intel Edison
Instructions
First, set up a wifi connection using this command
root@edison:~# configure_edison --wifiand following the on-screen instructions.Run the commands below to add these repositories and update.
echo "src/gz all http://repo.opkg.net/edison/repo/all" >> /etc/opkg/base-feeds.conf
echo "src/gz edison http://repo.opkg.net/edison/repo/edison" >> /etc/opkg/base-feeds.conf
echo "src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32" >> /etc/opkg/base-feeds.conf
opkg updatenpm install -g express@4.12.3 express-generator mongoskin emailjs mraa
npm install -g socket.io twilio socket.io-client exec-sync noble@0.3.9
npm install -g async@0.9.0 sleep
opkg install gitTo install MongoDB, we need to download the package that contains it and unpackage it. First, create a Mongo directory and change directory to it, to maintain our process more centralized.
Download the tgz file with the following command
create a binary folder and change to it, then unpack the file.
and we should see
Change directory to mongodb-linux-i686-2.6.8/bin with
Create a directory called data, this directory is where we are going to store all databases and collections that are created
Run
ongod --dbpath data/
an instance of mongo should be runnning connected to a default database called test.
Links
Mongo using Node.js
Gitbook on Frameworks/Node?
Status
mongo sucess
To do: Create a Gitbook on IoT Frameworks, Begin with Node to link Mongo and Node, create a restful api.
RESTful Service
To demonstrate how Mongo works, in this demo the user will create a simple restful web app with Node.js, Express and Mongo, to do in Node Gitbook and then replicate it here, same practice.
Last updated