add root route

This commit is contained in:
dwelle 2020-12-28 12:36:46 +01:00
parent 5f9fa61b3e
commit 2374d0956d

View File

@ -10,12 +10,17 @@ const socketDebug = debug("socket");
const app = express();
const port = process.env.PORT || 80; // default port to listen
app.get("/", (req, res) => {
res.send("Excalidraw collab server is up :)");
});
const server = http.createServer(app);
server.listen(port, () => {
serverDebug(`listening on port: ${port}`);
});
const io = socketIO(server, {
handlePreflightRequest: function (req, res) {
var headers = {