File size: 436 Bytes
94ed9e1
 
 
 
f804c96
94ed9e1
 
 
 
 
f804c96
94ed9e1
 
 
 
 
 
 
f804c96
94ed9e1
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from restful.routes import route

app = FastAPI(
    title = "Cryptocurency Prediction Service",
    version = "1.0"
)

# CORS Middleware
app.add_middleware(
    CORSMiddleware,
    allow_origins = ["*"],
    allow_methods = ["*"],
    allow_headers = ["*"],
    allow_credentials = True,
)

app.include_router(
    router = route,
    prefix = '/crypto'
)