get to a base level

This commit is contained in:
Dieter Blocher
2025-01-17 12:26:04 +00:00
parent d2e5cfad25
commit 4799cdf404
13 changed files with 1529 additions and 2 deletions

14
src/public/alt.html Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>HTML 5 Boilerplate</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Hiidfdcvdfsdgft</h1>
<script src="index.js"></script>
</body>
</html>

BIN
src/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
src/public/images/free.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

14
src/public/index.html Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Index.html</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Hiidfdcvdfsdgft</h1>
<img src="./images/free.png">
</body>
</html>

31
src/server.js Normal file
View File

@@ -0,0 +1,31 @@
const express = require('express')
require('dotenv').config();
const path = require('path');
const livereload = require('livereload');
const connectLivereload = require('connect-livereload');
// Setup livereload
const liveReloadServer = livereload.createServer();
liveReloadServer.watch(__dirname + "public"); // Watch public directory
const app = express()
// Middleware to inject livereload script
app.use(connectLivereload());
// Serve static files
app.use(express.static('public'));
// Set the views directory to "src/views"
app.set('views', path.join(__dirname, 'views'));
// Set the view engine (e.g., EJS)
app.set('view engine', 'ejs');
app.use(express.static(path.join(__dirname, 'public')));
app.get('/', (req, res) => {
res.render('index.ejs')
})
const port = process.env.PORT;
app.listen(port, () => console.log("Server is running on http://localhost:%i", port));

1
src/views/index.ejs Normal file
View File

@@ -0,0 +1 @@
<h1>Hi...</h1>