network
intention | attention
global safety system
global self sufficiency
global support system
global satisfaction system
global surveillance system
global survival system
SYSTEM GUIDE
Source code: https://github.com/automenta/netentionjs2
Web: http://netention.org
Source code: https://github.com/automenta/netentionjs2
sudo apt-get install git npm mongodb g++ libxml2-dev make
//install nodejs
wgethttp://nodejs.org/dist/v0.8.14/node-v0.8.14.tar.gz
tar xvzf node-v0.8.14.tar.gz
cd node-v0.8.14
./configure
make -j2
sudo make install
cd ..
git clonehttps://github.com/automenta/netentionjs2.git netention
cd netention
npm install
sudo npm install always -g
npm install --force htmlparser jsdom apricot
sudo ln -s /usr/bin/nodejs /usr/bin/node
Basically it needs node.js, the latest version, and then certain libraries installed via 'npm' the node package manager (i'll list them in the instructions). then run web.sh (which uses the very helpful 'always' package) and visit on port 8080 (specified in config.js).
the client/ folder is served publicly by the webserver as static files. this includes client-side html and javascript.
client/sensor contains the sensor hierarchy. some of the files (without .client.js) may be used by the server. this just keeps them in one place, organized by sensor category.
server/ contains server-side specific code.
1. Setting up the environment
-Install node.js
-Download and install mongodb
http://www.mongodb.org/downloads
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/
2. Get the code
-install github for windows :http://windows.github.com/
-Go to :https://github.com/automenta/netentionjs2
click on "clone in windows"
3. Install npm
-open windows command shell
-Go to the repository directory and run npm install :
type three commands : (in this case the directory is F:\rep\netentionjs2)
f:
cd \rep\netentionjs2
npm install
4. Create your custom webserver configuration
-create a file "localnetention.js" in the netentionjs2 root directory with this code :
var web = require('./server/web.js');
web.start('localhost:8080', 8080, 'localhost/o1', function(server) {
server.permissions['authenticate_to_configure_plugins'] = false;
server.permissions['authenticate_to_delete_objects'] = false;
server.permissions['authenticate_to_proxy_http'] = false;
});
the first parameter is the url it will run at, the second is the database url
5. edit web/server.js
Remove line 3 : var cortexit = require('./cortexit.js');
6. Launch the netention server
go to the command line and run:
node localnetention.js
you can then visithttp://localhost:8080 in your browser
go to the menu, 'Plugins', and enable some
Allow others access to your server
if it's not firewalled by your router
give them your IP and tell them port 8080
if your database gets full or something
you can create a new database by changing localhost/o1 in localnetention.js
to locahost/o2
and so on
just point it to a new url and you get a new database
the old one remains but it wont be accessed
you will have to re-enable plugins at that point too
because the list of enabled plugins is set in the db
it also allows you to switch between different db's