Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Server for Flurfunk

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 scripts
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .foreman
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Procfile
Octocat-spinner-32 README.md
Octocat-spinner-32 pom.xml
Octocat-spinner-32 project.clj
README.md

Flurfunk server

The Flurfunk server is written in Clojure, and built using Leiningen. It provides a REST API for use by clients.

Building and running

Installing Leiningen 2

curl -O https://raw.github.com/technomancy/leiningen/stable/bin/lein
chmod +x lein
mv lein ~/bin/ # Make sure that ~/bin/ exists and is on the $PATH

Running the tests

lein test

Running the server

lein ring server-headless [port]

Creating a WAR

lein ring uberwar flurfunk-server.war

This will create target/flurfunk-server.war.

Creating a standalone JAR that includes Jetty

lein uberjar

Running the standalone JAR

java -jar target/flurfunk-server.jar

Using a persistent database

Messages are per default stored in memory. There are two options for a persistent storage:

PostgreSQL

Flurfunk requires PostgreSQL 9.1 or above, and the hstore addon.

Create a user flurfunk with password flurfunk and a database flurfunk, or include the system property flurfunk.db.url to a JDBC URL string like this:

-Dflurfunk.db.url=postgresql://flurfunk:xxxxxxxxx@localhost:5432/flurfunk

Then run the server with the flurfunk.db system property set to postgresql, like this (optionally including the extra url parameter from above):

JAVA_OPTS="-Dflurfunk.db=postgresql" lein ring server-headless

FleetDB

mkdir temp
cd temp
curl -O http://fleetdb.s3.amazonaws.com/fleetdb-standalone.jar

Then launch the fleetdb server:

scripts/fleetdb-flurfunk

Finally, run the server with the flurfunk.db system property set to fleetdb, like this:

JAVA_OPTS="-Dflurfunk.db=fleetdb" lein ring server-headless

License

Copyright 2012 Viaboxx GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Something went wrong with that request. Please try again.