Compare commits
11 Commits
e20749e5eb
...
run
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d11465fcf | ||
|
|
366fd3311d | ||
|
|
1b1addfa42 | ||
|
|
c3d50d2ac1 | ||
|
|
826cfb48c9 | ||
|
|
ca77e0842d | ||
|
|
4ed3721ce5 | ||
|
|
bffd60bb94 | ||
|
|
5146f356b6 | ||
|
|
8bf47a6c5f | ||
|
|
8b5a6e27dd |
@@ -1,5 +1,9 @@
|
||||
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
|
||||
# Update system CA certificates
|
||||
RUN update-ca-certificates
|
||||
# Install MongoDB command line tools - though mongo-database-tools not available on arm64
|
||||
ARG MONGO_TOOLS_VERSION=6.0
|
||||
RUN . /etc/os-release \
|
||||
|
||||
@@ -5,27 +5,26 @@
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "app",
|
||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||
|
||||
// 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"
|
||||
},
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
// Configure properties specific to VS Code.
|
||||
"vscode": {
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"mongodb.mongodb-vscode"
|
||||
"mongodb.mongodb-vscode",
|
||||
"ms-azuretools.vscode-docker"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [3000, 27017],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "yarn install",
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
||||
@@ -16,6 +16,7 @@ services:
|
||||
# (Adding the "ports" property to this file will not forward from a Codespace.)
|
||||
|
||||
db:
|
||||
container_name: mongodb
|
||||
image: mongo:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
|
||||
22
.devcontainer/mitutoyo.crt
Normal file
@@ -0,0 +1,22 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDojCCAoqgAwIBAgIQY8oAt3ThH4xLeXIsyw6zrTANBgkqhkiG9w0BAQsFADBQ
|
||||
MRIwEAYKCZImiZPyLGQBGRYCREUxHDAaBgoJkiaJk/IsZAEZFgxNSVRVVE9ZTy1D
|
||||
VEwxHDAaBgNVBAMTE01JVFVUT1lPLUNUTC1CREMtQ0EwHhcNMjMxMDEyMDk1MTQ5
|
||||
WhcNMzgxMDEyMTAwMTQ4WjBQMRIwEAYKCZImiZPyLGQBGRYCREUxHDAaBgoJkiaJ
|
||||
k/IsZAEZFgxNSVRVVE9ZTy1DVEwxHDAaBgNVBAMTE01JVFVUT1lPLUNUTC1CREMt
|
||||
Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCe07y85lBkGeKPOUkx
|
||||
uqxtj79AxFy6an7oh6LjyDcm0Uf8p4Yl/StwQ474qg+SQ5vFh9KDVR9kkT6q1W1r
|
||||
+SCI0u/lynngSGgcJlCa4m+EqPPoSFQRh0iAJ7rPGxZWW4Ny6Dn1D0PF/FwbNIHr
|
||||
1qBmcvSGvVW4cYvcFaU3luclB7s9qSFM3+H7GcDdsZ2en6SVKhKEGSSqM5dC9+n4
|
||||
Ml9BBV5BgUW6j1q0yzgtKRG7/1oMtV/Yj+RCnwEzmF40raXWqYOvpBMCmTChE14P
|
||||
GW7UVWwS+6jHeqzFpvLzv5WLrzW22FViR/qV/5bmGoSj74JZ/oefkozeTg/yViC0
|
||||
IxUhAgMBAAGjeDB2MAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
|
||||
DgQWBBQOLNNUoeBKVbAApH/ZX3FRZClCMDASBgkrBgEEAYI3FQEEBQIDAQABMCMG
|
||||
CSsGAQQBgjcVAgQWBBRseoY/hsUyKpvnSnM37Vozh8et2TANBgkqhkiG9w0BAQsF
|
||||
AAOCAQEAKaCpNic5zq3tnKW1qZy/XPDC7PSQzSAlkb3PAbk4g1hm8RfmW9Z5ktfZ
|
||||
L5r1inGQvSeq8nkAuqGbX9eUyxTwJK7UioD5fds8uSYsJQKVvtcZxA8V+2Era1jy
|
||||
FPMOzO4my76kSwFjDCHRT8VvkaN3uuoHUTqZvUzb0cfjM8er9guNlnIpvoTKEXt7
|
||||
0oJ0GPxix80Rkcx7trK8Vmj4iG5C5/UDA3a8sQDHE2uqOallNPqBgSEE1SCPSpWn
|
||||
L2xg+fC5yAc7dOb/9OTKJGHcc3FgY51lrE0KhKgh6WSjCmjQrAPLQ1KpthVo0xyq
|
||||
NM9LX2+pAqNoANrxa7fiFqlnrXKcCg==
|
||||
-----END CERTIFICATE-----
|
||||
11
.devcontainer/sophos.crt
Normal file
@@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBlzCCATygAwIBAgIQ+r1RZTAbugn7zlrbTm7vHDAKBggqhkjOPQQDAjAzMSAw
|
||||
HgYDVQQDExdTb3Bob3MgRW5kcG9pbnQgRUMgUm9vdDEPMA0GA1UEChMGU29waG9z
|
||||
MB4XDTIzMDEyOTAwMzMwN1oXDTMwMDEyODE3MTczMVowMzEgMB4GA1UEAxMXU29w
|
||||
aG9zIEVuZHBvaW50IEVDIFJvb3QxDzANBgNVBAoTBlNvcGhvczBZMBMGByqGSM49
|
||||
AgEGCCqGSM49AwEHA0IABEl/hnLbxbDu20CgMwEmkTyz3HGt/KWZeg7p10rZz60e
|
||||
VgOwmGYBh+0maeHKKGhxCs2+QgCde7roJodn/FteQaqjMjAwMB0GA1UdDgQWBBTX
|
||||
b35JZhaEglsn4+ign9pOsHQjczAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMC
|
||||
A0kAMEYCIQDSWQ5VlOYhexhqygFekzI5EeT7ERibOn8KIHM9cOZQsQIhAPxje//X
|
||||
sapiH40dHw/cowZb4YBnZYDjlgWnj0vUHvhi
|
||||
-----END CERTIFICATE-----
|
||||
@@ -13,7 +13,7 @@ Passport-js
|
||||
https://www.youtube.com/watch?v=-RCnNyD0L-s
|
||||
|
||||
# Certificate
|
||||
The Container need our certificate!
|
||||
The Container need our certificate! -> Check if this works now?
|
||||
|
||||
# Documentation
|
||||
|
||||
|
||||
@@ -1,4 +1,32 @@
|
||||
# Start the Server:
|
||||
'''npm run devStart'''
|
||||
# Clone the Repository into a container
|
||||
|
||||

|
||||
Open VS Code and press ```Ctrl + Shift + P``` (Windows/Linux) or ```Cmd + Shift + P``` (Mac) to get to the Command Palette
|
||||
|
||||
Type ```DevContainers Clone...``` until you can see the command:
|
||||
DevContainers: Clone Repository in Container Volume...
|
||||

|
||||
|
||||
Enter the URL of the repository:
|
||||
|
||||
https://gitea.not-my.cloud/dieter/test_dev.git
|
||||
|
||||

|
||||
|
||||
The repo should be cloned and the container starts up:
|
||||
|
||||

|
||||
|
||||
Now you are able to open a new terminal:
|
||||
|
||||

|
||||
|
||||
# Start the Server:
|
||||
```npm run devStart``` or ```npx nodemon```
|
||||
|
||||

|
||||
|
||||
or
|
||||
|
||||

|
||||
|
||||
the second method uses the [nodemon.json](../nodemon.json) to configure nodemon.
|
||||
BIN
doc/assets/command_palllete.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
doc/assets/devcontainer_start.png
Normal file
|
After Width: | Height: | Size: 123 KiB |
BIN
doc/assets/new_terminal.png
Normal file
|
After Width: | Height: | Size: 140 KiB |
BIN
doc/assets/repo_url.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
BIN
doc/assets/start_node_server2.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"watch": ["src", "src/public", "config"],
|
||||
"ext": "js,json,html",
|
||||
"watch": ["src", "src/public", "src/views", "config", "stylesheets"],
|
||||
"ext": "js,json,css,html,ejs",
|
||||
"exec": "node ./src/server.js"
|
||||
}
|
||||
293
package-lock.json
generated
@@ -11,7 +11,9 @@
|
||||
"dependencies": {
|
||||
"dotenv": "^16.4.7",
|
||||
"ejs": "^3.1.10",
|
||||
"express": "^4.21.2"
|
||||
"express": "^4.21.2",
|
||||
"mongoose": "^8.9.5",
|
||||
"morgan": "^1.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"connect-livereload": "^0.6.1",
|
||||
@@ -19,6 +21,30 @@
|
||||
"nodemon": "^3.1.9"
|
||||
}
|
||||
},
|
||||
"node_modules/@mongodb-js/saslprep": {
|
||||
"version": "1.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.9.tgz",
|
||||
"integrity": "sha512-tVkljjeEaAhCqTzajSdgbQ6gE6f3oneVwa3iXR6csiEwXXOFsiC6Uh9iAjAhXPtqa/XMDHWjjeNH/77m/Yq2dw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"sparse-bitfield": "^3.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/webidl-conversions": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",
|
||||
"integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/whatwg-url": {
|
||||
"version": "11.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz",
|
||||
"integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/webidl-conversions": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/accepts": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
||||
@@ -79,6 +105,24 @@
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/basic-auth": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
|
||||
"integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safe-buffer": "5.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/basic-auth/node_modules/safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
||||
@@ -139,6 +183,15 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/bson": {
|
||||
"version": "6.10.1",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.10.1.tgz",
|
||||
"integrity": "sha512-P92xmHDQjSKPLHqFxefqMxASNq/aWJMEZugpCjf+AF/pgcUpMMQCg7t7+ewko0/u8AapvF3luf/FoehddEK+sA==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
}
|
||||
},
|
||||
"node_modules/bytes": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||
@@ -775,6 +828,15 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/kareem": {
|
||||
"version": "2.6.3",
|
||||
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.6.3.tgz",
|
||||
"integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/livereload": {
|
||||
"version": "0.9.3",
|
||||
"resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.3.tgz",
|
||||
@@ -819,6 +881,12 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/memory-pager": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
|
||||
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/merge-descriptors": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
|
||||
@@ -882,6 +950,162 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/mongodb": {
|
||||
"version": "6.12.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.12.0.tgz",
|
||||
"integrity": "sha512-RM7AHlvYfS7jv7+BXund/kR64DryVI+cHbVAy9P61fnb1RcWZqOW1/Wj2YhqMCx+MuYhqTRGv7AwHBzmsCKBfA==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@mongodb-js/saslprep": "^1.1.9",
|
||||
"bson": "^6.10.1",
|
||||
"mongodb-connection-string-url": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@aws-sdk/credential-providers": "^3.188.0",
|
||||
"@mongodb-js/zstd": "^1.1.0 || ^2.0.0",
|
||||
"gcp-metadata": "^5.2.0",
|
||||
"kerberos": "^2.0.1",
|
||||
"mongodb-client-encryption": ">=6.0.0 <7",
|
||||
"snappy": "^7.2.2",
|
||||
"socks": "^2.7.1"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@aws-sdk/credential-providers": {
|
||||
"optional": true
|
||||
},
|
||||
"@mongodb-js/zstd": {
|
||||
"optional": true
|
||||
},
|
||||
"gcp-metadata": {
|
||||
"optional": true
|
||||
},
|
||||
"kerberos": {
|
||||
"optional": true
|
||||
},
|
||||
"mongodb-client-encryption": {
|
||||
"optional": true
|
||||
},
|
||||
"snappy": {
|
||||
"optional": true
|
||||
},
|
||||
"socks": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/mongodb-connection-string-url": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.2.tgz",
|
||||
"integrity": "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/whatwg-url": "^11.0.2",
|
||||
"whatwg-url": "^14.1.0 || ^13.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mongoose": {
|
||||
"version": "8.9.5",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.9.5.tgz",
|
||||
"integrity": "sha512-SPhOrgBm0nKV3b+IIHGqpUTOmgVL5Z3OO9AwkFEmvOZznXTvplbomstCnPOGAyungtRXE5pJTgKpKcZTdjeESg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bson": "^6.10.1",
|
||||
"kareem": "2.6.3",
|
||||
"mongodb": "~6.12.0",
|
||||
"mpath": "0.9.0",
|
||||
"mquery": "5.0.0",
|
||||
"ms": "2.1.3",
|
||||
"sift": "17.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/mongoose"
|
||||
}
|
||||
},
|
||||
"node_modules/mongoose/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/morgan": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz",
|
||||
"integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"basic-auth": "~2.0.1",
|
||||
"debug": "2.6.9",
|
||||
"depd": "~2.0.0",
|
||||
"on-finished": "~2.3.0",
|
||||
"on-headers": "~1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/morgan/node_modules/on-finished": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
||||
"integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ee-first": "1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/mpath": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
|
||||
"integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mquery": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
|
||||
"integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "4.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mquery/node_modules/debug": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/mquery/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
@@ -1008,6 +1232,15 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/on-headers": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
|
||||
"integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/opts": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz",
|
||||
@@ -1063,6 +1296,15 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
||||
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
||||
@@ -1286,6 +1528,12 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sift": {
|
||||
"version": "17.1.3",
|
||||
"resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz",
|
||||
"integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/simple-update-notifier": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
|
||||
@@ -1299,6 +1547,15 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/sparse-bitfield": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
|
||||
"integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"memory-pager": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/statuses": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||
@@ -1352,6 +1609,18 @@
|
||||
"nodetouch": "bin/nodetouch.js"
|
||||
}
|
||||
},
|
||||
"node_modules/tr46": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz",
|
||||
"integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"punycode": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/type-is": {
|
||||
"version": "1.6.18",
|
||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
||||
@@ -1399,6 +1668,28 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
|
||||
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/whatwg-url": {
|
||||
"version": "14.1.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.1.0.tgz",
|
||||
"integrity": "sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tr46": "^5.0.0",
|
||||
"webidl-conversions": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "7.5.10",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
"dependencies": {
|
||||
"dotenv": "^16.4.7",
|
||||
"ejs": "^3.1.10",
|
||||
"express": "^4.21.2"
|
||||
"express": "^4.21.2",
|
||||
"mongoose": "^8.9.5",
|
||||
"morgan": "^1.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"connect-livereload": "^0.6.1",
|
||||
|
||||
33
src/middleware/database.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const mongoose = require("mongoose");
|
||||
const connectDB = async () => {
|
||||
try {
|
||||
const conn = await mongoose.connect('mongodb://mongodb:27017/tombola', {
|
||||
});
|
||||
console.log(`MongoDB Connected: ${conn.connection.host}:${conn.connection.port}`);
|
||||
// Get and log database stats
|
||||
const dbStats = await conn.connection.db.stats();
|
||||
console.log("Database Stats:", dbStats);
|
||||
|
||||
// Get and log all collections in the database
|
||||
const collections = await conn.connection.db.collections();
|
||||
if (collections.length > 0) {
|
||||
console.log("Collections:");
|
||||
collections.forEach(collection => {
|
||||
console.log(collection.collectionName);
|
||||
});
|
||||
// Get and log the indexes of a specific collection (optional)
|
||||
const collectionName = "collectionname"; // Replace with your collection name
|
||||
const indexes = await conn.connection.db.collection(collectionName).indexes();
|
||||
console.log(`Indexes in ${collectionName}:`);
|
||||
console.log(indexes);
|
||||
}
|
||||
|
||||
console.log("Finish Database Stats.");
|
||||
|
||||
} catch (error) {
|
||||
console.error(error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = connectDB;
|
||||
12
src/models/users.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
const UserSchema = new Schema({
|
||||
firstname: { type: String },
|
||||
familyname: { type: String },
|
||||
email: { type: String },
|
||||
phonenumber: { type: String },
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
});
|
||||
module.exports = mongoose.model('user', UserSchema, 'users');
|
||||
15
src/public/4acd7872dbae41e89c548130f6dca980.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Hacking Game...</title>
|
||||
<link rel="stylesheet" href="/stylesheets/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h3>Placeholder...</h3>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
19
src/public/access/false/safebox.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Hacking Game...</title>
|
||||
<link rel="stylesheet" href="/stylesheets/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<img class="background-image" src="/pictures/background05.png">
|
||||
<h3>
|
||||
<span style="color: red">U</span>nlock the secu<span style="color: red">r</span>ed safe quick<span
|
||||
style="color: red">l</span>y...
|
||||
</h3>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
21
src/public/access/true/safebox.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Hacking Game...</title>
|
||||
<link rel="stylesheet" href="/stylesheets/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<img class="background-image" src="/pictures/background06.png">
|
||||
<h3>Congratulations, you got the certificate!!!</h3>
|
||||
<h4>
|
||||
Find the hidden link to<a class="hidden_link" href="/4acd7872dbae41e89c548130f6dca980.html" target="_self">
|
||||
</a>
|
||||
continue...
|
||||
</h4>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
@@ -6,47 +7,11 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center><img class="background-image" src="./pictures/background01.png" usemap="#no">
|
||||
<div class="container">
|
||||
<img class="background-image" src="./pictures/background01.png" usemap="#no">
|
||||
<h3>Enter the door...</h3><map name="no"><area shape="rect" coords="501,158,634,380" alt="Test"
|
||||
href="./userpass.html"></map>
|
||||
</center>
|
||||
<style>
|
||||
.tb_button {
|
||||
padding: 1px;
|
||||
cursor: pointer;
|
||||
border-right: 1px solid #8b8b8b;
|
||||
border-left: 1px solid #FFF;
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
|
||||
.tb_button.hover {
|
||||
border: 2px outset #def;
|
||||
background-color: #f8f8f8 !important;
|
||||
}
|
||||
|
||||
.ws_toolbar {
|
||||
z-index: 100000
|
||||
}
|
||||
|
||||
.ws_toolbar .ws_tb_btn {
|
||||
cursor: pointer;
|
||||
border: 1px solid #555;
|
||||
padding: 3px
|
||||
}
|
||||
|
||||
.tb_highlight {
|
||||
background-color: yellow
|
||||
}
|
||||
|
||||
.tb_hide {
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
.ws_toolbar img {
|
||||
padding: 2px;
|
||||
margin: 0px
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,14 +0,0 @@
|
||||
<!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>Hiidfdcvdfsdgfthjhkjhhhhk</h1>
|
||||
<img src="./images/free.png">
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
@@ -6,7 +7,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
<div class="container">
|
||||
<form id="math-form">
|
||||
<div class="math-div"><img class="math-image" src="./pictures/background04.png"><input class="math-mask"
|
||||
type="text" id="nullstelle" name="nullstelle"><button id="abgeben-button"
|
||||
@@ -15,67 +16,30 @@
|
||||
</div>
|
||||
<h3>Solve the task...</h3>
|
||||
</form>
|
||||
</center>
|
||||
<script>checkInput = function (nullstelle) {
|
||||
nullstelle = btoa(nullstelle);
|
||||
if (nullstelle == "MA==") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
<script>checkInput = function (nullstelle) {
|
||||
nullstelle = btoa(nullstelle);
|
||||
if (nullstelle == "MA==") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById("math-form").addEventListener("submit", function (event) {
|
||||
event.preventDefault();
|
||||
let nullstelle = document.getElementById("nullstelle").value;
|
||||
if (checkInput(nullstelle)) {
|
||||
document.getElementById("wrong-solution").classList.add("hidden");
|
||||
document.getElementById("wrong-solution").classList.remove("visible");
|
||||
window.location.href = "/access/false/safebox";
|
||||
}
|
||||
else {
|
||||
document.getElementById("nullstelle").focus();
|
||||
document.getElementById("wrong-solution").classList.remove("hidden");
|
||||
document.getElementById("wrong-solution").classList.add("visible");
|
||||
}
|
||||
});</script>
|
||||
<style>
|
||||
.tb_button {
|
||||
padding: 1px;
|
||||
cursor: pointer;
|
||||
border-right: 1px solid #8b8b8b;
|
||||
border-left: 1px solid #FFF;
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
|
||||
.tb_button.hover {
|
||||
border: 2px outset #def;
|
||||
background-color: #f8f8f8 !important;
|
||||
}
|
||||
|
||||
.ws_toolbar {
|
||||
z-index: 100000
|
||||
}
|
||||
|
||||
.ws_toolbar .ws_tb_btn {
|
||||
cursor: pointer;
|
||||
border: 1px solid #555;
|
||||
padding: 3px
|
||||
}
|
||||
|
||||
.tb_highlight {
|
||||
background-color: yellow
|
||||
}
|
||||
|
||||
.tb_hide {
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
.ws_toolbar img {
|
||||
padding: 2px;
|
||||
margin: 0px
|
||||
}
|
||||
</style><span id="okta-plugin-message-channel-available" style="display: none;"></span>
|
||||
document.getElementById("math-form").addEventListener("submit", function (event) {
|
||||
event.preventDefault();
|
||||
let nullstelle = document.getElementById("nullstelle").value;
|
||||
if (checkInput(nullstelle)) {
|
||||
document.getElementById("wrong-solution").classList.add("hidden");
|
||||
document.getElementById("wrong-solution").classList.remove("visible");
|
||||
window.location.href = "/access/false/safebox.html";
|
||||
}
|
||||
else {
|
||||
document.getElementById("nullstelle").focus();
|
||||
document.getElementById("wrong-solution").classList.remove("hidden");
|
||||
document.getElementById("wrong-solution").classList.add("visible");
|
||||
}
|
||||
});</script>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
src/public/pictures/background05.png
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
src/public/pictures/background06.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
@@ -6,7 +7,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
<div class="container">
|
||||
<div class="userdata-div"><img class="background-image" src="./pictures/background00.png">
|
||||
<div class="typewriter" id="typewriter"><span class="type" style="--n:620">Your goal in this small hacker game is
|
||||
to enroll in university. You start as a student and all you have to do is pass your final math exam. To make
|
||||
@@ -18,44 +19,7 @@
|
||||
</div><a href="/enter_school.html">
|
||||
<h3>Start your task and good luck...</h3>
|
||||
</a>
|
||||
</center>
|
||||
<style>
|
||||
.tb_button {
|
||||
padding: 1px;
|
||||
cursor: pointer;
|
||||
border-right: 1px solid #8b8b8b;
|
||||
border-left: 1px solid #FFF;
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
|
||||
.tb_button.hover {
|
||||
border: 2px outset #def;
|
||||
background-color: #f8f8f8 !important;
|
||||
}
|
||||
|
||||
.ws_toolbar {
|
||||
z-index: 100000
|
||||
}
|
||||
|
||||
.ws_toolbar .ws_tb_btn {
|
||||
cursor: pointer;
|
||||
border: 1px solid #555;
|
||||
padding: 3px
|
||||
}
|
||||
|
||||
.tb_highlight {
|
||||
background-color: yellow
|
||||
}
|
||||
|
||||
.tb_hide {
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
.ws_toolbar img {
|
||||
padding: 2px;
|
||||
margin: 0px
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,30 +1,24 @@
|
||||
.h3
|
||||
{
|
||||
.h3 {
|
||||
color: white;
|
||||
}
|
||||
|
||||
h3:link
|
||||
{
|
||||
h3:link {
|
||||
color: white;
|
||||
}
|
||||
|
||||
h3:visited
|
||||
{
|
||||
h3:visited {
|
||||
color: white;
|
||||
}
|
||||
|
||||
h3:hover
|
||||
{
|
||||
h3:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
h3:active
|
||||
{
|
||||
h3:active {
|
||||
color: white;
|
||||
}
|
||||
|
||||
h3:link
|
||||
{
|
||||
h3:link {
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -33,27 +27,35 @@ body {
|
||||
padding: 0px;
|
||||
font: 26px "Lucida Grande", Helvetica, Arial, sans-serif;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
/* Centers horizontally */
|
||||
align-items: center;
|
||||
/* Centers vertically */
|
||||
height: 100vh;
|
||||
/* Ensures full height */
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.login-div{
|
||||
position:relative;
|
||||
display:inline-block;
|
||||
width:960px;
|
||||
.login-div {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 960px;
|
||||
}
|
||||
|
||||
|
||||
#login-hint{
|
||||
#login-hint {
|
||||
position: absolute;
|
||||
left: 220px;
|
||||
top: 353px;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#login-hint-map{
|
||||
#login-hint-map {
|
||||
z-index: 1000;
|
||||
position: absolute;
|
||||
top: 370px;
|
||||
@@ -62,100 +64,109 @@ a {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.login-image-div:hover{
|
||||
.login-image-div:hover {
|
||||
float: left;
|
||||
width: 240px;
|
||||
height: 90px;
|
||||
background: url("/pictures/userpass/background03_5x2.png")
|
||||
}
|
||||
|
||||
.login-mask{
|
||||
border:none;
|
||||
.login-mask {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding-inline: 5px;
|
||||
background: #212121;
|
||||
color: #36cb09;
|
||||
width:311px;
|
||||
width: 311px;
|
||||
height: 27px;
|
||||
}
|
||||
|
||||
#login-button{
|
||||
#login-button {
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border: 0;
|
||||
padding-inline: 2px;
|
||||
background: #36cb09;
|
||||
color: #212121;
|
||||
width:75px;
|
||||
width: 75px;
|
||||
height: 33px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: 566px;
|
||||
top: 301px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.login-mask:focus{
|
||||
border:none;
|
||||
.login-mask:focus {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.visible{
|
||||
.visible {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
.hidden {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#user{
|
||||
position: absolute; left: 320px; top: 154px;
|
||||
#user {
|
||||
position: absolute;
|
||||
left: 320px;
|
||||
top: 154px;
|
||||
}
|
||||
|
||||
|
||||
#password{
|
||||
position: absolute; left: 319px; top: 246px;
|
||||
#password {
|
||||
position: absolute;
|
||||
left: 319px;
|
||||
top: 246px;
|
||||
}
|
||||
|
||||
#credentials-error {
|
||||
position: absolute; left: 315px; top: 300px;
|
||||
position: absolute;
|
||||
left: 315px;
|
||||
top: 300px;
|
||||
color: #36cb09;
|
||||
}
|
||||
|
||||
.math-div{
|
||||
position:relative;
|
||||
display:inline-block;
|
||||
width:960px;
|
||||
.math-div {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 960px;
|
||||
}
|
||||
.math-mask{
|
||||
border:none;
|
||||
|
||||
.math-mask {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding-inline: 5px;
|
||||
background: #FFFFFF;
|
||||
color: black;
|
||||
width:144px;
|
||||
width: 144px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.math-mask:focus{
|
||||
border:none;
|
||||
.math-mask:focus {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#abgeben-button{
|
||||
#abgeben-button {
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
padding-inline: 2px;
|
||||
background: white;
|
||||
color: #212121;
|
||||
width:75px;
|
||||
width: 75px;
|
||||
height: 33px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: 529px;
|
||||
top: 405px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#wrong-solution{
|
||||
#wrong-solution {
|
||||
position: absolute;
|
||||
left: 613px;
|
||||
top: 343px;
|
||||
@@ -163,142 +174,150 @@ a {
|
||||
font-size: xx-large;
|
||||
}
|
||||
|
||||
#nullstelle{
|
||||
position: absolute; left: 446px; top: 346px;
|
||||
#nullstelle {
|
||||
position: absolute;
|
||||
left: 446px;
|
||||
top: 346px;
|
||||
}
|
||||
|
||||
.hidden_content
|
||||
{
|
||||
.hidden_content {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.hidden_link:link
|
||||
{
|
||||
.hidden_link:link {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.hidden_link:visited
|
||||
{
|
||||
.hidden_link:visited {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.hidden_link:hover
|
||||
{
|
||||
.hidden_link:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.hidden_link:active
|
||||
{
|
||||
.hidden_link:active {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.hidden_link:link
|
||||
{
|
||||
.hidden_link:link {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.userdata-div{
|
||||
position:relative;
|
||||
display:inline-block;
|
||||
width:960px;
|
||||
.userdata-div {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 960px;
|
||||
}
|
||||
|
||||
.userdata-mask
|
||||
{
|
||||
.userdata-mask {
|
||||
margin: 0;
|
||||
padding-inline: 5px;
|
||||
background: #FFFFFF;
|
||||
color: black;
|
||||
width:300px;
|
||||
width: 300px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.userdata-submit-mask
|
||||
{
|
||||
.userdata-submit-mask {
|
||||
margin: 0;
|
||||
padding-inline: 5px;
|
||||
background: lightgrey;
|
||||
color: black;
|
||||
width:150px;
|
||||
width: 150px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.userdata-lable-mask
|
||||
{
|
||||
.userdata-lable-mask {
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
#firstname_label
|
||||
{
|
||||
position: absolute; left: 300px; top: 170px;
|
||||
#firstname_label {
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
top: 170px;
|
||||
}
|
||||
|
||||
#firstname
|
||||
{
|
||||
position: absolute; left: 300px; top: 200px;
|
||||
#firstname {
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
top: 200px;
|
||||
}
|
||||
|
||||
#familyname_label
|
||||
{
|
||||
position: absolute; left: 300px; top: 230px;
|
||||
#familyname_label {
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
top: 230px;
|
||||
}
|
||||
|
||||
#familyname
|
||||
{
|
||||
position: absolute; left: 300px; top: 260px;
|
||||
#familyname {
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
top: 260px;
|
||||
}
|
||||
|
||||
#email_label
|
||||
{
|
||||
position: absolute; left: 300px; top: 290px;
|
||||
#email_label {
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
top: 290px;
|
||||
}
|
||||
|
||||
#email
|
||||
{
|
||||
position: absolute; left: 300px; top: 320px;
|
||||
#email {
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
top: 320px;
|
||||
}
|
||||
|
||||
#phonenumber_label
|
||||
{
|
||||
position: absolute; left: 300px; top: 350px;
|
||||
#phonenumber_label {
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
top: 350px;
|
||||
}
|
||||
|
||||
#phonenumber
|
||||
{
|
||||
position: absolute; left: 300px; top: 380px;
|
||||
#phonenumber {
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
top: 380px;
|
||||
}
|
||||
|
||||
#submit_data
|
||||
{
|
||||
position: absolute; left: 300px; top: 440px;
|
||||
#submit_data {
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
top: 440px;
|
||||
}
|
||||
|
||||
#typewriter
|
||||
{
|
||||
position: absolute; left: 275px; top: 50px;
|
||||
width:410px;
|
||||
#typewriter {
|
||||
position: absolute;
|
||||
left: 275px;
|
||||
top: 50px;
|
||||
width: 410px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.type {
|
||||
font-size: 17px;
|
||||
color:#0000;
|
||||
color: #0000;
|
||||
background:
|
||||
linear-gradient(-90deg,black 5px,#0000 0) 10px 0,
|
||||
linear-gradient(-90deg, black 5px, #0000 0) 10px 0,
|
||||
linear-gradient(black 0 0) 0 0;
|
||||
background-size:calc(var(--n)*1ch) 200%;
|
||||
-webkit-background-clip:padding-box,text;
|
||||
background-clip:padding-box,text;
|
||||
background-repeat:no-repeat;
|
||||
background-size: calc(var(--n)*1ch) 200%;
|
||||
-webkit-background-clip: padding-box, text;
|
||||
background-clip: padding-box, text;
|
||||
background-repeat: no-repeat;
|
||||
animation:
|
||||
b .2s infinite steps(1),
|
||||
t calc(var(--n)*.03s) steps(var(--n)) forwards;
|
||||
b .2s infinite steps(1),
|
||||
t calc(var(--n)*.03s) steps(var(--n)) forwards;
|
||||
}
|
||||
|
||||
@keyframes t{
|
||||
from {background-size:0 200%}
|
||||
@keyframes t {
|
||||
from {
|
||||
background-size: 0 200%
|
||||
}
|
||||
}
|
||||
@keyframes b{
|
||||
50% {background-position:0 -100%,0 0}
|
||||
|
||||
@keyframes b {
|
||||
50% {
|
||||
background-position: 0 -100%, 0 0
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
@@ -5,8 +6,9 @@
|
||||
<link rel="stylesheet" href="/stylesheets/style.css">
|
||||
</head>
|
||||
|
||||
<body><audio src="/sounds/background-electro.mp3" autoplay="" loop=""></audio>
|
||||
<center>
|
||||
<body>
|
||||
<audio src="./sounds/background-electro.mp3" autoplay loop></audio>
|
||||
<div class="container">
|
||||
<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;">
|
||||
@@ -14,83 +16,46 @@
|
||||
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>
|
||||
</center>
|
||||
<script>checkCredentials = function (username, password) {
|
||||
username = btoa(username);
|
||||
password = btoa(password);
|
||||
if (username == "TGVocmVy" && password == "dGVzdA==") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
<script>checkCredentials = function (username, password) {
|
||||
username = btoa(username);
|
||||
password = btoa(password);
|
||||
if (username == "TGVocmVy" && password == "dGVzdA==") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById("login-form").addEventListener("submit", function (event) {
|
||||
event.preventDefault();
|
||||
let username = document.getElementById("user").value;
|
||||
let password = document.getElementById("password").value;
|
||||
if (checkCredentials(username, password)) {
|
||||
document.getElementById("password").value = ""
|
||||
document.getElementById("credentials-error").classList.add("hidden");
|
||||
document.getElementById("credentials-error").classList.remove("visible");
|
||||
window.location.href = "/math_abi.html";
|
||||
}
|
||||
else {
|
||||
document.getElementById("password").value = ""
|
||||
document.getElementById("password").focus();
|
||||
document.getElementById("credentials-error").classList.remove("hidden");
|
||||
document.getElementById("credentials-error").classList.add("visible");
|
||||
}
|
||||
});
|
||||
document.getElementById("login-form").addEventListener("submit", function (event) {
|
||||
event.preventDefault();
|
||||
let username = document.getElementById("user").value;
|
||||
let password = document.getElementById("password").value;
|
||||
if (checkCredentials(username, password)) {
|
||||
document.getElementById("password").value = ""
|
||||
document.getElementById("credentials-error").classList.add("hidden");
|
||||
document.getElementById("credentials-error").classList.remove("visible");
|
||||
window.location.href = "/math_abi.html";
|
||||
}
|
||||
else {
|
||||
document.getElementById("password").value = ""
|
||||
document.getElementById("password").focus();
|
||||
document.getElementById("credentials-error").classList.remove("hidden");
|
||||
document.getElementById("credentials-error").classList.add("visible");
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById("login-hint-map").addEventListener("mouseenter", function (event) {
|
||||
document.getElementById("login-hint").style.visibility = "visible";
|
||||
});
|
||||
document.getElementById("login-hint-map").addEventListener("mouseenter", function (event) {
|
||||
document.getElementById("login-hint").style.visibility = "visible";
|
||||
});
|
||||
|
||||
document.getElementById("login-hint-map").addEventListener("mouseout", function (event) {
|
||||
document.getElementById("login-hint").style.visibility = "hidden";
|
||||
});</script><span id="okta-plugin-message-channel-available" style="display: none;"></span>
|
||||
<style>
|
||||
.tb_button {
|
||||
padding: 1px;
|
||||
cursor: pointer;
|
||||
border-right: 1px solid #8b8b8b;
|
||||
border-left: 1px solid #FFF;
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
|
||||
.tb_button.hover {
|
||||
border: 2px outset #def;
|
||||
background-color: #f8f8f8 !important;
|
||||
}
|
||||
|
||||
.ws_toolbar {
|
||||
z-index: 100000
|
||||
}
|
||||
|
||||
.ws_toolbar .ws_tb_btn {
|
||||
cursor: pointer;
|
||||
border: 1px solid #555;
|
||||
padding: 3px
|
||||
}
|
||||
|
||||
.tb_highlight {
|
||||
background-color: yellow
|
||||
}
|
||||
|
||||
.tb_hide {
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
.ws_toolbar img {
|
||||
padding: 2px;
|
||||
margin: 0px
|
||||
}
|
||||
</style>
|
||||
document.getElementById("login-hint-map").addEventListener("mouseout", function (event) {
|
||||
document.getElementById("login-hint").style.visibility = "hidden";
|
||||
});</script>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,8 +1,10 @@
|
||||
const express = require('express')
|
||||
require('dotenv').config();
|
||||
const path = require('path');
|
||||
const morgan = require('morgan');
|
||||
const livereload = require('livereload');
|
||||
const connectLivereload = require('connect-livereload');
|
||||
const connectDB = require('./middleware/database');
|
||||
|
||||
|
||||
// Setup livereload
|
||||
@@ -10,6 +12,10 @@ const liveReloadServer = livereload.createServer();
|
||||
liveReloadServer.watch(__dirname + "public"); // Watch public directory
|
||||
|
||||
const app = express()
|
||||
connectDB();
|
||||
|
||||
// Use morgan to log requests in 'combined' format (includes status code, method, URL, etc.)
|
||||
app.use(morgan('combined'));
|
||||
|
||||
// Middleware to inject livereload script
|
||||
app.use(connectLivereload());
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
<h1>Hi...</h1>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Home Page</title>
|
||||
<link rel="stylesheet" href="/stylesheets/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Hi...</h1>
|
||||
<a href="/start.html">Go to Start!!</a>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||