diff options
author | drebs <drebs@leap.se> | 2013-01-31 15:53:50 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-01-31 15:53:50 -0200 |
commit | 123c035b421dcb62a9cd36884f1f0761938899a0 (patch) | |
tree | 0a17618b8988879062fa307c42068a03903c42fb /src/leap/soledad | |
parent | 43eae005265333802ff1fa7180f7b5ae0833a79e (diff) |
Add basic Soledad server with no support for new backends yet.
Diffstat (limited to 'src/leap/soledad')
-rw-r--r-- | src/leap/soledad/server.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/leap/soledad/server.py b/src/leap/soledad/server.py new file mode 100644 index 00000000..708e2e8c --- /dev/null +++ b/src/leap/soledad/server.py @@ -0,0 +1,22 @@ +""" +An u1db server that stores data using couchdb. + +This should be run with: + twistd -n web --wsgi=leap.soledad.server.application +""" + +from twisted.web.wsgi import WSGIResource +from twisted.internet import reactor + +from u1db.remote import ( + http_app, + server_state, +) + +state = server_state.ServerState() +# TODO: change working dir to something meaningful +state.set_workingdir('/tmp') +# TODO: write a LeapHTTPApp that will use Couch as backend instead of SQLite +application = http_app.HTTPApp(state) + +resource = WSGIResource(reactor, reactor.getThreadPool(), application) |