mirror of
https://github.com/SrIzan10/YouRL.git
synced 2026-05-01 11:15:09 +00:00
Update server.js
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user