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 | 193b018842bd1c9460e77363338f057fcb22a390 (patch) | |
tree | 5465668518f91b6c2ebc363029f8aedc4f2a8db7 /server.py | |
parent | 7331249a6814eac085d5bbdb1e842614a0130917 (diff) |
Add basic Soledad server with no support for new backends yet.
Diffstat (limited to 'server.py')
-rw-r--r-- | server.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/server.py b/server.py new file mode 100644 index 00000000..708e2e8c --- /dev/null +++ b/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) |