I've been digging through tones of websites/tutorials trying to find an answer to my question. Perhaps I am misunderstanding few of the ideas regarding HTTPS.
Right, straight to the point... I host my SPA frontend app on express(4) using staticFiles pointing to index.html:
const express = require('express');
const auth = require('http-auth');
const app = express();
const basic = auth.basic({
file: `${__dirname}/login`
});
app.use(auth.connect(basic));
app.use(express.static(__dirname + '/dist'));
app.get('/*', function(req, res) {
res.sendFile(path.join(__dirname + '/dist/index.html'));
});
app.listen(process.env.PORT || 8080);
However it only runs on HTTP, I'd like to host it using HTTPS (backend also utilizes HTTPS for its requests).
I understand that HTTPS requires some sort of encryption so the request won't be send in plain text, but is it also required from frontend-hosted apps? If so, how would it be achievable?
Thanks guys!