iac_modules/app/python/FastAPI-MicroService/app/main.py
2023-08-20 12:09:35 +08:00

12 lines
278 B
Python

from grpclib.server import Server
from routes.main import AppService
async def main():
server = Server([AppService()])
await server.start('127.0.0.1', 50051)
print('Serving on localhost:50051')
if __name__ == '__main__':
import asyncio
asyncio.run(main())