This commit is contained in:
counterweight 2025-02-06 19:20:16 +01:00
parent 8113741ffe
commit 85431a5dbe
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 19 additions and 14 deletions

View file

@ -2,21 +2,11 @@ const express = require('express');
const app = express();
const port = 3000;
app.set('view engine', 'ejs');
app.set('views', './views');
app.get('/', (req, res) => {
res.send(`
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello World</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>Hello World! We're live</h1>
<p>Now this is some production grade stuff, baby!</p>
</body>
</html>
`);
res.render('index');
});
app.listen(port, () => {

15
views/index.ejs Normal file
View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello World</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>Hello World! We're live</h1>
<p>Now this is some production grade stuff, baby!</p>
</body>
</html>