Node.js https server doesn’t work when I separate it in two files

I have this node.js https server that works when it is in one app.js file but when I split it in 2 files it doesn’t work anymore. I don’t know why.. This app.js works But when I separate it in 2 files app.js and certificate.js it doesn’t work anymore app.js certificate.js I’m getting this syntax error I also tried to to this And I was getting this error connection failed: Error in connection establishment: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH So when it was all in app.js file it worked perfectly. But when I tried to separate it in 2 files it doesn’t work anymore..