init user-service

This commit is contained in:
2023-09-27 16:51:22 +01:00
parent 0341a938fd
commit b725dae0f9
21 changed files with 5565 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { fastify } from "fastify";
import { fastifyConnectPlugin } from "@connectrpc/connect-fastify";
import routes from "./connect";
export default async function serveRPC(): Promise<void> {
const server = fastify({ http2: true, logger: true });
await server.register(fastifyConnectPlugin, { routes: routes });
await server.listen({ host: "0.0.0.0", port: 9090 });
console.log("rpc server is listening at", server.addresses());
}