Hi.
I am using serverless with AWS and lambda and I make my tests with serverless–offline.
Unfortunately, I am not able to switch from page to page in my web app. Maybe it’s too late and I’m not able to think straigth, but can someone give me the instruction to redirect a user on an other page when he clicks on a button?
Here is my serverless.yml:
hello:
handler: index.inspirilabHandler
package:
include:
- views/main.ejs
- views/page2.ejs
events:
- http:
path: /
method: get
Here is the index.js (without the imports):
app.get('/', function(req, res) {
res.render('main.ejs')
})
app.get('/page2', function(req, res) {
res.render('page2.ejs');
})
Here is one button:
<form action="/page2" method="get">
<button type="submit" class="btn btn-default">PAGE2</button>
</form>
What is the link I should provide to my form?
Newbie in serverless, but your tool is amazing!