Verified Commit 9566ac98 authored by Aral Balkan's avatar Aral Balkan
Browse files

Globally-trusted certificates are working

parent c65035f0
......@@ -49,10 +49,12 @@ if (arguments.port !== undefined) {
// If an email is passed, use it.
let email = undefined
if (arguments.email !== undefined) {
email = arguments.email
if (arguments.global !== undefined) {
email = arguments.global
}
console.log('email', email)
if (!fs.existsSync(pathToServe)) {
console.log(` 🤔 Error: could not find path ${pathToServe}\n`)
process.exit(1)
......
......@@ -53,6 +53,7 @@ class HttpsServer {
// Can also be called as serve(pathToServe, port)
if (typeof callback === 'number') {
email = port
port = callback
callback = null
}
......@@ -78,7 +79,7 @@ class HttpsServer {
let server
try {
server = this.createServer({certificateType, email}, app).listen(port, callback)
server = this.createServer({email}, app).listen(port, callback)
} catch (error) {
console.log('\nError: could not start server', error)
throw error
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment