2020-04-04 04:08:12 +02:00
|
|
|
// lib/server.ts
|
|
|
|
import App from "./src/App";
|
2020-11-13 18:00:22 +01:00
|
|
|
import grpc from "grpc";
|
|
|
|
import {roomManager} from "./src/RoomManager";
|
|
|
|
import {IRoomManagerServer, RoomManagerService} from "./src/Messages/generated/messages_grpc_pb";
|
|
|
|
|
2020-12-02 17:51:46 +01:00
|
|
|
App.listen(8080, () => console.log(`WorkAdventure starting on port 8080!`))
|
2020-11-13 18:00:22 +01:00
|
|
|
|
|
|
|
const server = new grpc.Server();
|
|
|
|
server.addService<IRoomManagerServer>(RoomManagerService, roomManager);
|
|
|
|
|
|
|
|
server.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure());
|
|
|
|
server.start();
|