get to a base level
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -129,4 +129,3 @@ dist
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
|
||||
15
README.md
15
README.md
@@ -3,5 +3,18 @@
|
||||
From here:
|
||||
https://www.youtube.com/watch?v=SDa3v4Quj7Y
|
||||
|
||||
Auth:
|
||||
https://www.youtube.com/watch?v=bgk1mI2pak4
|
||||
|
||||
Middelware:
|
||||
https://www.youtube.com/watch?v=_I6gP_nIFIA
|
||||
|
||||
Passport-js
|
||||
https://www.youtube.com/watch?v=-RCnNyD0L-s
|
||||
|
||||
# Certificate
|
||||
The Container need our certificate!
|
||||
The Container need our certificate!
|
||||
|
||||
# Documentation
|
||||
|
||||
[Documentation](./doc/README.md)
|
||||
4
doc/README.md
Normal file
4
doc/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Start the Server:
|
||||
'''npm run devStart'''
|
||||
|
||||

|
||||
BIN
doc/assets/image.png
Normal file
BIN
doc/assets/image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
5
nodemon.json
Normal file
5
nodemon.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"watch": ["src", "src/public", "config"],
|
||||
"ext": "js,json,html",
|
||||
"exec": "node ./src/server.js"
|
||||
}
|
||||
1425
package-lock.json
generated
Normal file
1425
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
21
package.json
Normal file
21
package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "hacker_game",
|
||||
"version": "1.0.1",
|
||||
"description": "Just a hacker game for fairs",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"devStart": "nodemon ./src/server.js"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.4.7",
|
||||
"ejs": "^3.1.10",
|
||||
"express": "^4.21.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"connect-livereload": "^0.6.1",
|
||||
"livereload": "^0.9.3",
|
||||
"nodemon": "^3.1.9"
|
||||
}
|
||||
}
|
||||
14
src/public/alt.html
Normal file
14
src/public/alt.html
Normal 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
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
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
14
src/public/index.html
Normal 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
31
src/server.js
Normal 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
1
src/views/index.ejs
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Hi...</h1>
|
||||
Reference in New Issue
Block a user