This repository was archived by the owner on Jul 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Getting Started
dan-nl edited this page Apr 10, 2013
·
3 revisions
If you already have an excellent Connect/Express application, using Limn is very simple.
- Install the package via npm:
cd path/to/your/project
npm install limn
- Add Limn as middleware:
var limn = require('limn');
app = express.createServer();
// ... other configuration ...
// mount Limn at /vis
app.use('/vis', limn({
dataDir : './data'
}));
See the Middleware wiki page for more info.
- Finally, you'll next need to configure Limn to know about your datasources (though in the future we aim for the client to be able introspect this information from the data).
standalone install
cd /one-level-up/from/desired-location
git clone git://github.com/wikimedia/limn.git
cd limn
npm install
npm start
cd /path/to-limn/var/data
mkdir datafiles
cd datafiles
# create and/or copy datafiles here
- after adding local datafiles
- browse to your application url, e.g. http://localhost:8081/datasources
- click on the Add a New Data Source button.
- Datafile URL : ./data/datafiles/your-data-file.csv
- ?? file out the id field with ??
- click the Save button
Run Node.js as a Service on Ubuntu store the file in /etc/init/ example :
description "limn server"
author "your-email-address@mail.com"
# used to be: start on startup
# until we found some mounts weren't ready yet while booting:
start on started mountall
stop on shutdown
# Automatically Respawn:
respawn
respawn limit 99 5
script
# Not sure why $HOME is needed, but we found that it is:
export HOME="/home/your-service-user-name"
cd /path/to/limn
exec su your-service-user-name -c 'npm start' >> /var/log/limn.log 2>&1
end script
post-start script
# Optionally put a script here that will notifiy you node has (re)started
# /root/bin/hoptoad.sh "node.js has started!"
end script