Created
August 26, 2022 13:51
-
-
Save seatedro/668d8cf09fa6fac8888f570eaa1221f3 to your computer and use it in GitHub Desktop.
Transcription Server 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express, { Express, Request, Response } from "express"; | |
import { createServer } from "https"; | |
const app: Express = express(); | |
const server = createServer( | |
{ | |
key: fs.readFileSync("key.pem"), | |
cert: fs.readFileSync("cert.pem"), | |
}, | |
app | |
); | |
const port = 3000; | |
const io = new Server(server, { | |
cors: { | |
origin: "*", | |
}, | |
}); | |
server.listen(port, () => { | |
console.log(`⚡️[server]: Server is running at https://localhost:${port}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code is broken ^
tips hat