Skip to content

Commit

Permalink
Fallback to http if certificate generation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
kendlbat authored Aug 9, 2023
1 parent 32c9058 commit abf9a93
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sslserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ async function main() {

server.registerRouter(apiRouter, "/api");

server.listenSSL("ssl@kendlbat.dev");
try {
server.listenSSL("ssl@kendlbat.dev");
} catch (e) {
console.error(e);
server.listen().then(console.log);
}
}

main();

0 comments on commit abf9a93

Please sign in to comment.