Skip to content
Advertisement

Trying to run express node js as https server but it won’t run

I’m trying to get HTTPS working on express.js for node, and it won’t run.

This is my server.js code.

JavaScript

When I run it reports no errors but it just get stuck to nothing (I waited 30 minutes to see if it does something and nothing happened).

Console Screenshot

Advertisement

Answer

httpServer.listen(8080, ()=>{console.log('Server is running')}); If the server successfully started, it should output “Server is running” in the console. This is a nice way to check if the server is working as intended.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement