-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (25 loc) · 741 Bytes
/
main.py
File metadata and controls
33 lines (25 loc) · 741 Bytes
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
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from routers import signpdf, verifypdf
app = FastAPI(root_path="/api/v1", version="0.1.0")
app.add_middleware(
CORSMiddleware,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(
signpdf.router,
prefix="/pdf"
)
app.include_router(
verifypdf.router,
prefix="/pdf"
)
@app.get("/")
async def root():
return {"Greetings": "Hey! Thank you for using this service. If you don't know how to use it, check out readme on "
"Github.",
"Repository": "https://github.com/Adrixop95/Barcode-Service/",
"MOTD": "Have a nice day : D"
}