Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1516

How do I specify https for an express app when serving from AWS?

$
0
0

I've deployed both a frontend react app and backend node/express app on AWS lightsail.I've configured my frontend to use https using bncert, but I need to make my backend use https now. I added this config to my express app

const options = {    key: fs.readFileSync('/opt/bitnami/apache/conf/bitnami/certs/server.key'),    cert: fs.readFileSync('/opt/bitnami/apache/conf/bitnami/certs/server.crt'),}const server = https.createServer(options, app);server.listen(5000, () => {  console.log('HTTPS Server running on port 5000');});

However when I go to my website like this: https://myapp.com:5000/api/getcontent Chrome warns me that this app is not secure. Does anyone know what the problem is?


Viewing all articles
Browse latest Browse all 1516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>