1
Could I set a route on Amazon Route 53 ou/e S3
as I do in the nodejs
with express
? goes below.
app.get('/', function (req, res) {
res.sendFile(path.join(__dirname + '/website/index.html'));
});
app.get('/login', function (req, res) {
res.sendFile(path.join(__dirname + '/login.html'));
});
//Se for qualquer outra rota
app.get('/*', function (req, res) {
res.redirect('login.html?group='+req.url.substr(1));
});
In short, the directions I want would be
www.meusite.com.br -> index.html
www.meusite.com.br/login -> login.html
www.meusite.com.br/abc -> login.html?group=abc
www.meusite.com.br/aaaa -> login.html?group=aaaa
I would like to use the AmazonCloud front + S3
and I’m not seeing how to route the way I do with the nodejs, I tried to see if I could with the Route 53
but cannot.
Could just leave running an application nodejs
with this routing and directing to the CloudFront
but I don’t really like this idea, the good would be straight through Amazon
This, can not make a dynamic route as we do with the Nodejs express, in case, I gave up using Cloudfront, thanks for the reply
– Rodrigo Rodrigues