Compare commits
10 Commits
1b1addfa42
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7538d5ea59 | |||
|
|
4ba3fcea08 | ||
|
|
b73e655e89 | ||
| 71e3adf351 | |||
| bc8f30e924 | |||
| 2ed058df64 | |||
| 7cc5200f24 | |||
| 1e74de1393 | |||
|
|
0d11465fcf | ||
|
|
366fd3311d |
@@ -1,6 +1,11 @@
|
||||
FROM mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm
|
||||
# Copy the Sophos CA certificate into the container
|
||||
COPY sophos.crt /usr/local/share/ca-certificates/sophos.crt
|
||||
COPY mitutoyo.crt /usr/local/share/ca-certificates/mitutoyo.crt
|
||||
# Merge multiple CA certificates into one file
|
||||
RUN cat /usr/local/share/ca-certificates/sophos.crt \
|
||||
/usr/local/share/ca-certificates/mitutoyo.crt \
|
||||
> /usr/local/share/ca-certificates/custom-ca.pem
|
||||
# Update system CA certificates
|
||||
RUN update-ca-certificates
|
||||
# Install MongoDB command line tools - though mongo-database-tools not available on arm64
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
"containerEnv": {
|
||||
"NODE_EXTRA_CA_CERTS": "/usr/local/share/ca-certificates/sophos.crt"
|
||||
"NODE_EXTRA_CA_CERTS": "/usr/local/share/ca-certificates/custom-ca.pem"
|
||||
},
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
|
||||
22
.devcontainer/mitutoyo.crt
Normal file
22
.devcontainer/mitutoyo.crt
Normal file
@@ -0,0 +1,22 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDojCCAoqgAwIBAgIQY8oAt3ThH4xLeXIsyw6zrTANBgkqhkiG9w0BAQsFADBQ
|
||||
MRIwEAYKCZImiZPyLGQBGRYCREUxHDAaBgoJkiaJk/IsZAEZFgxNSVRVVE9ZTy1D
|
||||
VEwxHDAaBgNVBAMTE01JVFVUT1lPLUNUTC1CREMtQ0E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qOallNPqBgSEE1SCPSpWn
|
||||
L2xg+fC5yAc7dOb/9OTKJGHcc3FgY51lrE0KhKgh6WSjCmjQrAPLQ1KpthVo0xyq
|
||||
NM9LX2+pAqNoANrxa7fiFqlnrXKcCg==
|
||||
-----END CERTIFICATE-----
|
||||
19
README.md
19
README.md
@@ -1,20 +1,3 @@
|
||||
# test_dev
|
||||
|
||||
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! -> Check if this works now?
|
||||
|
||||
# Documentation
|
||||
|
||||
[Documentation](./doc/README.md)
|
||||
Repo has moved to: https://gitea.not-my.cloud/education/hacker-game
|
||||
|
||||
@@ -20,7 +20,16 @@ Now you are able to open a new terminal:
|
||||
|
||||

|
||||
|
||||
# Start the Server:
|
||||
# Install packages
|
||||
|
||||
First you should install all related packages with
|
||||
|
||||
```npm install```
|
||||
|
||||
This will install the packages defined in [package.json](../package.json)
|
||||
|
||||
# Start the Server
|
||||
|
||||
```npm run devStart``` or ```npx nodemon```
|
||||
|
||||

|
||||
@@ -30,3 +39,13 @@ or
|
||||

|
||||
|
||||
the second method uses the [nodemon.json](../nodemon.json) to configure nodemon.
|
||||
|
||||
# .env file
|
||||
|
||||
To have different behavior on your dev host, you cloud add an .env file.
|
||||
|
||||
Here are the key-values of an .evc file:
|
||||
|
||||
```bash
|
||||
PORT = 3000
|
||||
```
|
||||
2
example.env
Normal file
2
example.env
Normal file
@@ -0,0 +1,2 @@
|
||||
# App Port
|
||||
PORT = 3000
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
@@ -6,8 +7,8 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<audio src="./sounds/background-electro.mp3" autoplay loop></audio>
|
||||
<div class="container">
|
||||
<audio src="/sounds/background-electro.mp3" autoplay="" loop=""></audio>
|
||||
<form id="login-form">
|
||||
<div class="login-div"><img src="./pictures/background02.png"><img id="login-hint"
|
||||
src="./pictures/background03-cropped.png" style="visibility: hidden;">
|
||||
@@ -15,7 +16,7 @@
|
||||
placeholder="Enter Username here..."><input class="login-mask" type="password" name="password"
|
||||
id="password" placeholder="Enter Password here..."><button id="login-button"
|
||||
type="submit">Ok!</button>
|
||||
<div class="visible" id="credentials-error">Wrong credentials!</div>
|
||||
<div class="hidden" id="credentials-error">Wrong credentials!</div>
|
||||
</div>
|
||||
<h3>Enter your credentials...</h3>
|
||||
</form>
|
||||
|
||||
@@ -33,5 +33,6 @@ app.get('/', (req, res) => {
|
||||
res.render('index.ejs')
|
||||
})
|
||||
|
||||
const port = process.env.PORT;
|
||||
const port = process.env.PORT || 3000;;
|
||||
|
||||
app.listen(port, () => console.log("Server is running on http://localhost:%i", port));
|
||||
Reference in New Issue
Block a user