summaryrefslogtreecommitdiff
path: root/server_with_soledad_syncer.py
blob: 0a2fb1484d5c2d721fff2d89bc6bbdb402451a51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
import os

from klein import run, route

import soledad_sync as sync


@route('/start-sync')
def home(request):
    print "GOT REQUEST FOR STARTING SYNC..."
    d = sync.upload_soledad_stuff()
    return d


@route('/ping')
def ping(request):
    return 'easy!'


@route('/pid')
def pid(request):
    return str(os.getpid())


if __name__ == "__main__":
    #s = sync._get_soledad_instance_from_uuid(
        #sync.UUID, 'pass', '/tmp/soledadsync', sync.HOST, '', '')

    run("localhost", 8080)