-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
44 lines (39 loc) · 1.45 KB
/
main.py
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import cyclone.web
from twisted.internet import reactor
from twisted.python import log
from handlers import *
import sys
class Application(cyclone.web.Application):
def __init__(self):
handlers = [
(r"/stocks",GetBodegasHandler),
(r"/points",GetPuntosHandler),
(r"/sales",GetVentasHandler),
(r"/sellers",GetVendedorHandler),
(r"/products",GetProductosHandler),
(r"/batches",GetLotesHandler),
(r"/stocksdetail",GetBodegasDetailHandler),
(r"/pointsdetail",GetPuntosDetailHandler),
(r"/salesdetail",GetVentasDetailHandler),
(r"/sellersdetail",GetVendedorDetailHandler),
(r"/productsdetail",GetProductosDetailHandler),
(r"/batechesdetail",GetLotesDetailHandler),
(r"/poststock",GuardaBodegaHandler),
(r"/postpoint",GuardaPuntoHandler),
(r"/postsale",GuardaVentaHandler),
(r"/postseller",GuardaVendedorHandler),
(r"/postproduct",GuardaProductoHandler),
(r"/postbatch",GuardaLoteHandler),
(r"/logout",LogoutHandler),
(r"/login",LoginHandler),
(r"/agregar",LlenarHandler),
(r"/(.*)",RenderHandler, {"path": "Frontend"})
]
settings = dict()
cyclone.web.Application.__init__(self, handlers, **settings)
def main():
log.startLogging(sys.stdout)
reactor.listenTCP(8904, Application(), interface="0.0.0.0")
reactor.run()
if __name__ == "__main__":
main()