Clojure based implementation of RuuviTrackerServer.
See http://www.ruuvi.com for more details.
Server works either as standalone application, using a HTTP Servlet container (for example Jetty) or with Heroku cloud.
This software provides only REST and WebSocket APIs. User interface is available in separate project RuuviTracker/ruuvitracker_web.
There is a rewrite of the server application works at https://github.com/jsyrjala/massive-batman
Most of the discussions about development happen on IRCNet channel #ruuvitracker.
There is also a mailing list at https://groups.google.com/forum/?fromgroups#!forum/ruuvitracker-dev
git: http://git-scm.com/
Leiningen: https://github.com/technomancy/leiningen
sudo apt-get install leiningen
or sudo yum install leiningen
. Most of the distributions will currently have old 1.x.x version of leiningen.Currently server implements Tracker API and Client API partially.
Fetch sources
git clone git://github.com/jsyrjala/ruuvitracker_server.git
Setup database, see src/resources/server-dev-config.clj
Fetch dependencies
lein deps
Create tables to database
lein run -m ruuvi-server.launcher migrate
(Optional) Import example data to database
lein run -m ruuvi-server.launcher load-example-data
Start server
lein ring server
Access web application http://localhost:3001/api/v1-dev/events
git clone git://github.com/RuuviTracker/ruuvitracker_server.git
heroku create --stack cedar
git remote add heroku git@heroku.com:APPNAME.git
heroku addons:add heroku-postgresql:dev
heroku config:add RUUVISERVER_ENV=heroku --app APPNAME
Create tables to database and some content to tables
heroku run lein run -m ruuvi-server.launcher migrate
(Optional) Import example data to database
heroku run lein run -m ruuvi-server.launcher load-example-data
Start heroku process
heroku scale web=1
Access the app http://APPNAME.herokuapp.com/api/v1-dev/events
Server uses PostgreSQL or H2 database engines. See resources/server-XXX-config.clj
files for database configuration.
Static html files are located in resources/public
. Add javascript ui there.
Travis is used as CI.
See http://travis-ci.org/#!/RuuviTracker/ruuvitracker_server
Production code lives under 'src', unit-tests and other automatic tests live under 'test'. Directory 'test-utils' contains scripts usable in manual testing. Directory 'resources' contains data files that are not executable code.
Unit tests are implemented with Midje.
Copyright (C) 2012 Juha Syrjälä
BSD License