MCPcopy Create free account
hub / github.com/alexey-dc/nextjs_express_template / httpsServer

Function httpsServer

app/server.js:10–17  ·  view source on GitHub ↗
(express)

Source from the content-addressed store, hash-verified

8}
9
10const httpsServer = (express) => {
11 const fs = require('fs')
12 const options = {
13 key: fs.readFileSync(process.env.SSL_PRIVATE_KEY_PATH, 'utf8'),
14 cert: fs.readFileSync(process.env.SSL_CERTIFICATE_PATH, 'utf8')
15 }
16 return require('https').createServer(options, express)
17}
18
19class Server {
20 constructor(port) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected