Update server.js

This commit is contained in:
2022-03-31 16:36:30 +02:00
committed by GitHub
parent f59e1f285b
commit 67e3f738ad

View File

@@ -33,6 +33,9 @@ app.get("/", async (req, res) => {
const shortUrls = await ShortUrl.find();
res.render("index", { shortUrls: shortUrls });
});
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');
app.set('views', __dirname);
//post
app.post("/shortUrls", async (req, res) => {