Initially the index.ejs template was running but all of a sudden it just could not render the template anymore. I have no idea where the error could be.
I am getting the error message: Cannot GET /
app.get('/index', function(req, res) {
fs.readFile('items.json', function(error, data) {
if (error) {
res.status(500).end();
} else {
res.render('index.ejs', {
stripePublicKey: stripePublicKey,
items: JSON.parse(data),
});
}
})
})
app.listen(3000);