Make base web
This commit is contained in:
parent
b3b11d2d01
commit
7787cc5b69
|
@ -0,0 +1,16 @@
|
|||
from os import sysenv
|
||||
from fastapi import FastAPI
|
||||
from pymongo import MongoClient
|
||||
|
||||
app = FastAPI()
|
||||
client = MongoClient('mongodb+srv://admin:admin@mongo/chat')
|
||||
|
||||
|
||||
@app.get('/api/v1/messages')
|
||||
async def v1_messages():
|
||||
return {'message': 'Hello World'}
|
||||
|
||||
|
||||
@app.post('/api/v1/message')
|
||||
async def v1_message():
|
||||
return {'message': 'Hello World'}
|
Loading…
Reference in New Issue