diff --git a/.vscode/launch.json b/.vscode/launch.json
index 95cccf8..4617779 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,6 +5,13 @@
"version": "0.2.0",
"configurations": [
{
+ "type": "chrome",
+ "request": "launch",
+ "name": "Client starten",
+ "url": "http://localhost:8085/",
+ "webRoot": "${workspaceFolder}"
+ },
+ {
"type": "node",
"request": "launch",
"name": "Mocha Tests",
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 95cccf8..4617779 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,6 +5,13 @@
"version": "0.2.0",
"configurations": [
{
+ "type": "chrome",
+ "request": "launch",
+ "name": "Client starten",
+ "url": "http://localhost:8085/",
+ "webRoot": "${workspaceFolder}"
+ },
+ {
"type": "node",
"request": "launch",
"name": "Mocha Tests",
diff --git a/package-lock.json b/package-lock.json
index f7ad28f..137ed02 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
"integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
+ "dev": true,
"requires": {
"@types/connect": "*",
"@types/node": "*"
@@ -23,19 +24,22 @@
"version": "3.4.32",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
"integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
+ "dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/events": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
- "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA=="
+ "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
+ "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
+ "dev": true
},
"@types/express": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz",
"integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==",
+ "dev": true,
"requires": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
@@ -43,9 +47,10 @@
}
},
"@types/express-graphql": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.1.tgz",
- "integrity": "sha512-GFWXi4hIn3PP7Et6+zVsqqLn7pnkiSAqtB1/v/prLQgIiSmYO0cZuQVtHQCeHH79nlWCMEzESIjAqUPgFGm0jA==",
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.2.tgz",
+ "integrity": "sha512-6ZixmJn0wvdGkBg2XTyVJH5qqE1GViD1lMbCRVFzLLL0mHKmsyc0ji1A9Rv/3lGrTnP8v468+k5vTy91mlxNpQ==",
+ "dev": true,
"requires": {
"@types/express": "*",
"@types/graphql": "*"
@@ -55,6 +60,7 @@
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz",
"integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==",
+ "dev": true,
"requires": {
"@types/events": "*",
"@types/node": "*",
@@ -62,14 +68,16 @@
}
},
"@types/graphql": {
- "version": "14.0.1",
- "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.1.tgz",
- "integrity": "sha512-JnkzkyIHAjK7+zJLEQieQg5iDwEqoX200BBFa0rfMU7jI9BQWBnM9BZh16gQecCyBjK0S149wZPb0SoTh2o34g=="
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.3.tgz",
+ "integrity": "sha512-TcFkpEjcQK7w8OcrQcd7iIBPjU0rdyi3ldj6d0iJ4PPSzbWqPBvXj9KSwO14hTOX2dm9RoiH7VuxksJLNYdXUQ==",
+ "dev": true
},
"@types/mime": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz",
- "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA=="
+ "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==",
+ "dev": true
},
"@types/mocha": {
"version": "5.2.5",
@@ -78,19 +86,22 @@
"dev": true
},
"@types/node": {
- "version": "10.11.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.4.tgz",
- "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ=="
+ "version": "10.12.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz",
+ "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==",
+ "dev": true
},
"@types/range-parser": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz",
- "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw=="
+ "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==",
+ "dev": true
},
"@types/serve-static": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz",
"integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
+ "dev": true,
"requires": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
@@ -599,6 +610,15 @@
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
+ "path": {
+ "version": "0.12.7",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+ "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
+ "requires": {
+ "process": "^0.11.1",
+ "util": "^0.10.3"
+ }
+ },
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -616,6 +636,11 @@
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
+ },
"proxy-addr": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
@@ -759,6 +784,14 @@
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
+ "util": {
+ "version": "0.10.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "requires": {
+ "inherits": "2.0.3"
+ }
+ },
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 95cccf8..4617779 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,6 +5,13 @@
"version": "0.2.0",
"configurations": [
{
+ "type": "chrome",
+ "request": "launch",
+ "name": "Client starten",
+ "url": "http://localhost:8085/",
+ "webRoot": "${workspaceFolder}"
+ },
+ {
"type": "node",
"request": "launch",
"name": "Mocha Tests",
diff --git a/package-lock.json b/package-lock.json
index f7ad28f..137ed02 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
"integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
+ "dev": true,
"requires": {
"@types/connect": "*",
"@types/node": "*"
@@ -23,19 +24,22 @@
"version": "3.4.32",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
"integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
+ "dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/events": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
- "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA=="
+ "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
+ "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
+ "dev": true
},
"@types/express": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz",
"integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==",
+ "dev": true,
"requires": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
@@ -43,9 +47,10 @@
}
},
"@types/express-graphql": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.1.tgz",
- "integrity": "sha512-GFWXi4hIn3PP7Et6+zVsqqLn7pnkiSAqtB1/v/prLQgIiSmYO0cZuQVtHQCeHH79nlWCMEzESIjAqUPgFGm0jA==",
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.2.tgz",
+ "integrity": "sha512-6ZixmJn0wvdGkBg2XTyVJH5qqE1GViD1lMbCRVFzLLL0mHKmsyc0ji1A9Rv/3lGrTnP8v468+k5vTy91mlxNpQ==",
+ "dev": true,
"requires": {
"@types/express": "*",
"@types/graphql": "*"
@@ -55,6 +60,7 @@
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz",
"integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==",
+ "dev": true,
"requires": {
"@types/events": "*",
"@types/node": "*",
@@ -62,14 +68,16 @@
}
},
"@types/graphql": {
- "version": "14.0.1",
- "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.1.tgz",
- "integrity": "sha512-JnkzkyIHAjK7+zJLEQieQg5iDwEqoX200BBFa0rfMU7jI9BQWBnM9BZh16gQecCyBjK0S149wZPb0SoTh2o34g=="
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.3.tgz",
+ "integrity": "sha512-TcFkpEjcQK7w8OcrQcd7iIBPjU0rdyi3ldj6d0iJ4PPSzbWqPBvXj9KSwO14hTOX2dm9RoiH7VuxksJLNYdXUQ==",
+ "dev": true
},
"@types/mime": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz",
- "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA=="
+ "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==",
+ "dev": true
},
"@types/mocha": {
"version": "5.2.5",
@@ -78,19 +86,22 @@
"dev": true
},
"@types/node": {
- "version": "10.11.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.4.tgz",
- "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ=="
+ "version": "10.12.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz",
+ "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==",
+ "dev": true
},
"@types/range-parser": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz",
- "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw=="
+ "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==",
+ "dev": true
},
"@types/serve-static": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz",
"integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
+ "dev": true,
"requires": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
@@ -599,6 +610,15 @@
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
+ "path": {
+ "version": "0.12.7",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+ "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
+ "requires": {
+ "process": "^0.11.1",
+ "util": "^0.10.3"
+ }
+ },
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -616,6 +636,11 @@
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
+ },
"proxy-addr": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
@@ -759,6 +784,14 @@
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
+ "util": {
+ "version": "0.10.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "requires": {
+ "inherits": "2.0.3"
+ }
+ },
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
diff --git a/package.json b/package.json
index 3db30fb..d46a93b 100644
--- a/package.json
+++ b/package.json
@@ -9,15 +9,16 @@
"author": "Peter Zilz",
"license": "ISC",
"dependencies": {
- "@types/express": "^4.16.0",
- "@types/express-graphql": "^0.6.1",
"express": "^4.16.4",
"express-graphql": "^0.6.12",
"fs": "0.0.1-security",
- "graphql": "^0.13.2"
+ "graphql": "^0.13.2",
+ "path": "^0.12.7"
},
"devDependencies": {
"@types/chai": "^4.1.6",
+ "@types/express": "^4.16.0",
+ "@types/express-graphql": "^0.6.2",
"@types/mocha": "^5.2.5",
"chai": "^4.2.0",
"mocha": "^5.2.0"
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 95cccf8..4617779 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,6 +5,13 @@
"version": "0.2.0",
"configurations": [
{
+ "type": "chrome",
+ "request": "launch",
+ "name": "Client starten",
+ "url": "http://localhost:8085/",
+ "webRoot": "${workspaceFolder}"
+ },
+ {
"type": "node",
"request": "launch",
"name": "Mocha Tests",
diff --git a/package-lock.json b/package-lock.json
index f7ad28f..137ed02 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
"integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
+ "dev": true,
"requires": {
"@types/connect": "*",
"@types/node": "*"
@@ -23,19 +24,22 @@
"version": "3.4.32",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
"integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
+ "dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/events": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
- "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA=="
+ "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
+ "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
+ "dev": true
},
"@types/express": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz",
"integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==",
+ "dev": true,
"requires": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
@@ -43,9 +47,10 @@
}
},
"@types/express-graphql": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.1.tgz",
- "integrity": "sha512-GFWXi4hIn3PP7Et6+zVsqqLn7pnkiSAqtB1/v/prLQgIiSmYO0cZuQVtHQCeHH79nlWCMEzESIjAqUPgFGm0jA==",
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.2.tgz",
+ "integrity": "sha512-6ZixmJn0wvdGkBg2XTyVJH5qqE1GViD1lMbCRVFzLLL0mHKmsyc0ji1A9Rv/3lGrTnP8v468+k5vTy91mlxNpQ==",
+ "dev": true,
"requires": {
"@types/express": "*",
"@types/graphql": "*"
@@ -55,6 +60,7 @@
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz",
"integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==",
+ "dev": true,
"requires": {
"@types/events": "*",
"@types/node": "*",
@@ -62,14 +68,16 @@
}
},
"@types/graphql": {
- "version": "14.0.1",
- "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.1.tgz",
- "integrity": "sha512-JnkzkyIHAjK7+zJLEQieQg5iDwEqoX200BBFa0rfMU7jI9BQWBnM9BZh16gQecCyBjK0S149wZPb0SoTh2o34g=="
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.3.tgz",
+ "integrity": "sha512-TcFkpEjcQK7w8OcrQcd7iIBPjU0rdyi3ldj6d0iJ4PPSzbWqPBvXj9KSwO14hTOX2dm9RoiH7VuxksJLNYdXUQ==",
+ "dev": true
},
"@types/mime": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz",
- "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA=="
+ "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==",
+ "dev": true
},
"@types/mocha": {
"version": "5.2.5",
@@ -78,19 +86,22 @@
"dev": true
},
"@types/node": {
- "version": "10.11.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.4.tgz",
- "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ=="
+ "version": "10.12.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz",
+ "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==",
+ "dev": true
},
"@types/range-parser": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz",
- "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw=="
+ "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==",
+ "dev": true
},
"@types/serve-static": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz",
"integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
+ "dev": true,
"requires": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
@@ -599,6 +610,15 @@
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
+ "path": {
+ "version": "0.12.7",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+ "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
+ "requires": {
+ "process": "^0.11.1",
+ "util": "^0.10.3"
+ }
+ },
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -616,6 +636,11 @@
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
+ },
"proxy-addr": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
@@ -759,6 +784,14 @@
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
+ "util": {
+ "version": "0.10.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "requires": {
+ "inherits": "2.0.3"
+ }
+ },
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
diff --git a/package.json b/package.json
index 3db30fb..d46a93b 100644
--- a/package.json
+++ b/package.json
@@ -9,15 +9,16 @@
"author": "Peter Zilz",
"license": "ISC",
"dependencies": {
- "@types/express": "^4.16.0",
- "@types/express-graphql": "^0.6.1",
"express": "^4.16.4",
"express-graphql": "^0.6.12",
"fs": "0.0.1-security",
- "graphql": "^0.13.2"
+ "graphql": "^0.13.2",
+ "path": "^0.12.7"
},
"devDependencies": {
"@types/chai": "^4.1.6",
+ "@types/express": "^4.16.0",
+ "@types/express-graphql": "^0.6.2",
"@types/mocha": "^5.2.5",
"chai": "^4.2.0",
"mocha": "^5.2.0"
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000..1d3f892
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ Labyrinth - Infinite Prototype Version -1
+
+
+
+
+
+
Infinite Prototype
+ Version -1
+
+
+
+
+
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 95cccf8..4617779 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,6 +5,13 @@
"version": "0.2.0",
"configurations": [
{
+ "type": "chrome",
+ "request": "launch",
+ "name": "Client starten",
+ "url": "http://localhost:8085/",
+ "webRoot": "${workspaceFolder}"
+ },
+ {
"type": "node",
"request": "launch",
"name": "Mocha Tests",
diff --git a/package-lock.json b/package-lock.json
index f7ad28f..137ed02 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
"integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
+ "dev": true,
"requires": {
"@types/connect": "*",
"@types/node": "*"
@@ -23,19 +24,22 @@
"version": "3.4.32",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
"integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
+ "dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/events": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
- "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA=="
+ "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
+ "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
+ "dev": true
},
"@types/express": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz",
"integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==",
+ "dev": true,
"requires": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
@@ -43,9 +47,10 @@
}
},
"@types/express-graphql": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.1.tgz",
- "integrity": "sha512-GFWXi4hIn3PP7Et6+zVsqqLn7pnkiSAqtB1/v/prLQgIiSmYO0cZuQVtHQCeHH79nlWCMEzESIjAqUPgFGm0jA==",
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.2.tgz",
+ "integrity": "sha512-6ZixmJn0wvdGkBg2XTyVJH5qqE1GViD1lMbCRVFzLLL0mHKmsyc0ji1A9Rv/3lGrTnP8v468+k5vTy91mlxNpQ==",
+ "dev": true,
"requires": {
"@types/express": "*",
"@types/graphql": "*"
@@ -55,6 +60,7 @@
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz",
"integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==",
+ "dev": true,
"requires": {
"@types/events": "*",
"@types/node": "*",
@@ -62,14 +68,16 @@
}
},
"@types/graphql": {
- "version": "14.0.1",
- "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.1.tgz",
- "integrity": "sha512-JnkzkyIHAjK7+zJLEQieQg5iDwEqoX200BBFa0rfMU7jI9BQWBnM9BZh16gQecCyBjK0S149wZPb0SoTh2o34g=="
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.3.tgz",
+ "integrity": "sha512-TcFkpEjcQK7w8OcrQcd7iIBPjU0rdyi3ldj6d0iJ4PPSzbWqPBvXj9KSwO14hTOX2dm9RoiH7VuxksJLNYdXUQ==",
+ "dev": true
},
"@types/mime": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz",
- "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA=="
+ "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==",
+ "dev": true
},
"@types/mocha": {
"version": "5.2.5",
@@ -78,19 +86,22 @@
"dev": true
},
"@types/node": {
- "version": "10.11.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.4.tgz",
- "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ=="
+ "version": "10.12.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz",
+ "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==",
+ "dev": true
},
"@types/range-parser": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz",
- "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw=="
+ "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==",
+ "dev": true
},
"@types/serve-static": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz",
"integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
+ "dev": true,
"requires": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
@@ -599,6 +610,15 @@
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
+ "path": {
+ "version": "0.12.7",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+ "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
+ "requires": {
+ "process": "^0.11.1",
+ "util": "^0.10.3"
+ }
+ },
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -616,6 +636,11 @@
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
+ },
"proxy-addr": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
@@ -759,6 +784,14 @@
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
+ "util": {
+ "version": "0.10.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "requires": {
+ "inherits": "2.0.3"
+ }
+ },
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
diff --git a/package.json b/package.json
index 3db30fb..d46a93b 100644
--- a/package.json
+++ b/package.json
@@ -9,15 +9,16 @@
"author": "Peter Zilz",
"license": "ISC",
"dependencies": {
- "@types/express": "^4.16.0",
- "@types/express-graphql": "^0.6.1",
"express": "^4.16.4",
"express-graphql": "^0.6.12",
"fs": "0.0.1-security",
- "graphql": "^0.13.2"
+ "graphql": "^0.13.2",
+ "path": "^0.12.7"
},
"devDependencies": {
"@types/chai": "^4.1.6",
+ "@types/express": "^4.16.0",
+ "@types/express-graphql": "^0.6.2",
"@types/mocha": "^5.2.5",
"chai": "^4.2.0",
"mocha": "^5.2.0"
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000..1d3f892
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ Labyrinth - Infinite Prototype Version -1
+
+
+
+
+
+
Infinite Prototype
+ Version -1
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app.ts b/src/app.ts
index a5ba318..4c461af 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -1,21 +1,26 @@
import * as express from "express";
+import { join } from "path";
import { FileStateRepository } from "./FileStateRepository";
import { GameServer, GameServerOptions } from "./GameServer";
import { CreateLabyrinthMiddleware } from "./LabyrinthMiddleware";
import { createSampleMaps } from "./SampleMaps";
+// settings
const port = 8085;
const apiRoot = "/graphql";
const saveFile = "./repo.lgr";
+const webRoot = "/";
+
const app = express();
const gameOptions = {
mapRepo: { loadAllMaps: createSampleMaps },
stateRepo: new FileStateRepository(saveFile),
} as GameServerOptions;
-
const games = new GameServer(gameOptions);
-
app.use(apiRoot, CreateLabyrinthMiddleware(true, games));
+app.use(webRoot + "style", express.static(join(__dirname, "..", "style")));
+app.use(webRoot, express.static(join(__dirname, "..", "public")));
+
app.listen(port, () => console.log(`App listening on port ${port}...`));
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 95cccf8..4617779 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,6 +5,13 @@
"version": "0.2.0",
"configurations": [
{
+ "type": "chrome",
+ "request": "launch",
+ "name": "Client starten",
+ "url": "http://localhost:8085/",
+ "webRoot": "${workspaceFolder}"
+ },
+ {
"type": "node",
"request": "launch",
"name": "Mocha Tests",
diff --git a/package-lock.json b/package-lock.json
index f7ad28f..137ed02 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
"integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
+ "dev": true,
"requires": {
"@types/connect": "*",
"@types/node": "*"
@@ -23,19 +24,22 @@
"version": "3.4.32",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
"integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
+ "dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/events": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
- "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA=="
+ "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
+ "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
+ "dev": true
},
"@types/express": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz",
"integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==",
+ "dev": true,
"requires": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
@@ -43,9 +47,10 @@
}
},
"@types/express-graphql": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.1.tgz",
- "integrity": "sha512-GFWXi4hIn3PP7Et6+zVsqqLn7pnkiSAqtB1/v/prLQgIiSmYO0cZuQVtHQCeHH79nlWCMEzESIjAqUPgFGm0jA==",
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.2.tgz",
+ "integrity": "sha512-6ZixmJn0wvdGkBg2XTyVJH5qqE1GViD1lMbCRVFzLLL0mHKmsyc0ji1A9Rv/3lGrTnP8v468+k5vTy91mlxNpQ==",
+ "dev": true,
"requires": {
"@types/express": "*",
"@types/graphql": "*"
@@ -55,6 +60,7 @@
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz",
"integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==",
+ "dev": true,
"requires": {
"@types/events": "*",
"@types/node": "*",
@@ -62,14 +68,16 @@
}
},
"@types/graphql": {
- "version": "14.0.1",
- "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.1.tgz",
- "integrity": "sha512-JnkzkyIHAjK7+zJLEQieQg5iDwEqoX200BBFa0rfMU7jI9BQWBnM9BZh16gQecCyBjK0S149wZPb0SoTh2o34g=="
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.3.tgz",
+ "integrity": "sha512-TcFkpEjcQK7w8OcrQcd7iIBPjU0rdyi3ldj6d0iJ4PPSzbWqPBvXj9KSwO14hTOX2dm9RoiH7VuxksJLNYdXUQ==",
+ "dev": true
},
"@types/mime": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz",
- "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA=="
+ "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==",
+ "dev": true
},
"@types/mocha": {
"version": "5.2.5",
@@ -78,19 +86,22 @@
"dev": true
},
"@types/node": {
- "version": "10.11.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.4.tgz",
- "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ=="
+ "version": "10.12.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz",
+ "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==",
+ "dev": true
},
"@types/range-parser": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz",
- "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw=="
+ "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==",
+ "dev": true
},
"@types/serve-static": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz",
"integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
+ "dev": true,
"requires": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
@@ -599,6 +610,15 @@
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
+ "path": {
+ "version": "0.12.7",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+ "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
+ "requires": {
+ "process": "^0.11.1",
+ "util": "^0.10.3"
+ }
+ },
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -616,6 +636,11 @@
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
+ },
"proxy-addr": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
@@ -759,6 +784,14 @@
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
+ "util": {
+ "version": "0.10.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "requires": {
+ "inherits": "2.0.3"
+ }
+ },
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
diff --git a/package.json b/package.json
index 3db30fb..d46a93b 100644
--- a/package.json
+++ b/package.json
@@ -9,15 +9,16 @@
"author": "Peter Zilz",
"license": "ISC",
"dependencies": {
- "@types/express": "^4.16.0",
- "@types/express-graphql": "^0.6.1",
"express": "^4.16.4",
"express-graphql": "^0.6.12",
"fs": "0.0.1-security",
- "graphql": "^0.13.2"
+ "graphql": "^0.13.2",
+ "path": "^0.12.7"
},
"devDependencies": {
"@types/chai": "^4.1.6",
+ "@types/express": "^4.16.0",
+ "@types/express-graphql": "^0.6.2",
"@types/mocha": "^5.2.5",
"chai": "^4.2.0",
"mocha": "^5.2.0"
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000..1d3f892
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ Labyrinth - Infinite Prototype Version -1
+
+
+
+
+
+
Infinite Prototype
+ Version -1
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app.ts b/src/app.ts
index a5ba318..4c461af 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -1,21 +1,26 @@
import * as express from "express";
+import { join } from "path";
import { FileStateRepository } from "./FileStateRepository";
import { GameServer, GameServerOptions } from "./GameServer";
import { CreateLabyrinthMiddleware } from "./LabyrinthMiddleware";
import { createSampleMaps } from "./SampleMaps";
+// settings
const port = 8085;
const apiRoot = "/graphql";
const saveFile = "./repo.lgr";
+const webRoot = "/";
+
const app = express();
const gameOptions = {
mapRepo: { loadAllMaps: createSampleMaps },
stateRepo: new FileStateRepository(saveFile),
} as GameServerOptions;
-
const games = new GameServer(gameOptions);
-
app.use(apiRoot, CreateLabyrinthMiddleware(true, games));
+app.use(webRoot + "style", express.static(join(__dirname, "..", "style")));
+app.use(webRoot, express.static(join(__dirname, "..", "public")));
+
app.listen(port, () => console.log(`App listening on port ${port}...`));
diff --git a/style/core.css b/style/core.css
new file mode 100755
index 0000000..efda5e1
--- /dev/null
+++ b/style/core.css
@@ -0,0 +1,32 @@
+html, body {
+ margin: 0;
+ background: #202020;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #EEEEEE;
+ height: 100%;
+}
+
+input[type=text], input[type=password] {
+ /* font-family: Arial, Helvetica, sans-serif; */
+ background-color: #EEEEEE;
+ color: #202020;
+}
+
+a, input[type=button], input[type=submit] {
+ color: #EEEEEE;
+ background: rgb(69, 18, 255);
+ border: 0;
+ border-radius: 3px;
+ padding: 5px;
+ font-size: 1em;
+}
+a:hover, input[type=button]:hover, input[type=submit]:hover {
+ background: rgb(51, 15, 182);
+ cursor: pointer;
+}
+a:active, input[type=button]:active, input[type=submit]:active {
+ background: rgb(37, 12, 131);
+}
+input[type=button]:disabled, input[type=submit]:disabled {
+ background: #202020;
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 95cccf8..4617779 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,6 +5,13 @@
"version": "0.2.0",
"configurations": [
{
+ "type": "chrome",
+ "request": "launch",
+ "name": "Client starten",
+ "url": "http://localhost:8085/",
+ "webRoot": "${workspaceFolder}"
+ },
+ {
"type": "node",
"request": "launch",
"name": "Mocha Tests",
diff --git a/package-lock.json b/package-lock.json
index f7ad28f..137ed02 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
"integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
+ "dev": true,
"requires": {
"@types/connect": "*",
"@types/node": "*"
@@ -23,19 +24,22 @@
"version": "3.4.32",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
"integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
+ "dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/events": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
- "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA=="
+ "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
+ "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
+ "dev": true
},
"@types/express": {
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz",
"integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==",
+ "dev": true,
"requires": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
@@ -43,9 +47,10 @@
}
},
"@types/express-graphql": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.1.tgz",
- "integrity": "sha512-GFWXi4hIn3PP7Et6+zVsqqLn7pnkiSAqtB1/v/prLQgIiSmYO0cZuQVtHQCeHH79nlWCMEzESIjAqUPgFGm0jA==",
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/@types/express-graphql/-/express-graphql-0.6.2.tgz",
+ "integrity": "sha512-6ZixmJn0wvdGkBg2XTyVJH5qqE1GViD1lMbCRVFzLLL0mHKmsyc0ji1A9Rv/3lGrTnP8v468+k5vTy91mlxNpQ==",
+ "dev": true,
"requires": {
"@types/express": "*",
"@types/graphql": "*"
@@ -55,6 +60,7 @@
"version": "4.16.0",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz",
"integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==",
+ "dev": true,
"requires": {
"@types/events": "*",
"@types/node": "*",
@@ -62,14 +68,16 @@
}
},
"@types/graphql": {
- "version": "14.0.1",
- "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.1.tgz",
- "integrity": "sha512-JnkzkyIHAjK7+zJLEQieQg5iDwEqoX200BBFa0rfMU7jI9BQWBnM9BZh16gQecCyBjK0S149wZPb0SoTh2o34g=="
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.3.tgz",
+ "integrity": "sha512-TcFkpEjcQK7w8OcrQcd7iIBPjU0rdyi3ldj6d0iJ4PPSzbWqPBvXj9KSwO14hTOX2dm9RoiH7VuxksJLNYdXUQ==",
+ "dev": true
},
"@types/mime": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz",
- "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA=="
+ "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==",
+ "dev": true
},
"@types/mocha": {
"version": "5.2.5",
@@ -78,19 +86,22 @@
"dev": true
},
"@types/node": {
- "version": "10.11.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.4.tgz",
- "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ=="
+ "version": "10.12.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz",
+ "integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==",
+ "dev": true
},
"@types/range-parser": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz",
- "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw=="
+ "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==",
+ "dev": true
},
"@types/serve-static": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz",
"integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
+ "dev": true,
"requires": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
@@ -599,6 +610,15 @@
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
+ "path": {
+ "version": "0.12.7",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+ "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
+ "requires": {
+ "process": "^0.11.1",
+ "util": "^0.10.3"
+ }
+ },
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -616,6 +636,11 @@
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
+ },
"proxy-addr": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
@@ -759,6 +784,14 @@
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
+ "util": {
+ "version": "0.10.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "requires": {
+ "inherits": "2.0.3"
+ }
+ },
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
diff --git a/package.json b/package.json
index 3db30fb..d46a93b 100644
--- a/package.json
+++ b/package.json
@@ -9,15 +9,16 @@
"author": "Peter Zilz",
"license": "ISC",
"dependencies": {
- "@types/express": "^4.16.0",
- "@types/express-graphql": "^0.6.1",
"express": "^4.16.4",
"express-graphql": "^0.6.12",
"fs": "0.0.1-security",
- "graphql": "^0.13.2"
+ "graphql": "^0.13.2",
+ "path": "^0.12.7"
},
"devDependencies": {
"@types/chai": "^4.1.6",
+ "@types/express": "^4.16.0",
+ "@types/express-graphql": "^0.6.2",
"@types/mocha": "^5.2.5",
"chai": "^4.2.0",
"mocha": "^5.2.0"
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000..1d3f892
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ Labyrinth - Infinite Prototype Version -1
+
+
+
+
+
+
Infinite Prototype
+ Version -1
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app.ts b/src/app.ts
index a5ba318..4c461af 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -1,21 +1,26 @@
import * as express from "express";
+import { join } from "path";
import { FileStateRepository } from "./FileStateRepository";
import { GameServer, GameServerOptions } from "./GameServer";
import { CreateLabyrinthMiddleware } from "./LabyrinthMiddleware";
import { createSampleMaps } from "./SampleMaps";
+// settings
const port = 8085;
const apiRoot = "/graphql";
const saveFile = "./repo.lgr";
+const webRoot = "/";
+
const app = express();
const gameOptions = {
mapRepo: { loadAllMaps: createSampleMaps },
stateRepo: new FileStateRepository(saveFile),
} as GameServerOptions;
-
const games = new GameServer(gameOptions);
-
app.use(apiRoot, CreateLabyrinthMiddleware(true, games));
+app.use(webRoot + "style", express.static(join(__dirname, "..", "style")));
+app.use(webRoot, express.static(join(__dirname, "..", "public")));
+
app.listen(port, () => console.log(`App listening on port ${port}...`));
diff --git a/style/core.css b/style/core.css
new file mode 100755
index 0000000..efda5e1
--- /dev/null
+++ b/style/core.css
@@ -0,0 +1,32 @@
+html, body {
+ margin: 0;
+ background: #202020;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #EEEEEE;
+ height: 100%;
+}
+
+input[type=text], input[type=password] {
+ /* font-family: Arial, Helvetica, sans-serif; */
+ background-color: #EEEEEE;
+ color: #202020;
+}
+
+a, input[type=button], input[type=submit] {
+ color: #EEEEEE;
+ background: rgb(69, 18, 255);
+ border: 0;
+ border-radius: 3px;
+ padding: 5px;
+ font-size: 1em;
+}
+a:hover, input[type=button]:hover, input[type=submit]:hover {
+ background: rgb(51, 15, 182);
+ cursor: pointer;
+}
+a:active, input[type=button]:active, input[type=submit]:active {
+ background: rgb(37, 12, 131);
+}
+input[type=button]:disabled, input[type=submit]:disabled {
+ background: #202020;
+}
diff --git a/style/labyrinth.css b/style/labyrinth.css
new file mode 100644
index 0000000..e3508e0
--- /dev/null
+++ b/style/labyrinth.css
@@ -0,0 +1,50 @@
+.fullScreen {
+ width: 100%;
+ height: 100%;
+}
+
+.centeredBox {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+/* #divStartScreen h1,
+#divStartScreen h2 {
+ font-family: Arial, Helvetica, sans-serif;
+} */
+
+.menuBox {
+ margin: auto;
+ width: fit-content;
+ background-color: #303030;
+ padding-top: 3em;
+ padding-bottom: 3em;
+ padding-left: 4em;
+ padding-right: 4em;
+ border-radius: 0.7em;
+}
+
+.menuBox input[type=button] {
+ padding: 0.7em;
+ font-size: 1.5em;
+ display: block;
+ margin: auto;
+ margin-top: 0.5em;
+}
+
+.selectlist {
+ max-height: 10em;
+ overflow-y: scroll;
+}
+
+.selectlist input[type=button] {
+ display: block;
+ font-size: 1.25em;
+ border-radius: 0;
+ border-bottom: 1px solid rgb(57, 20, 194);
+ margin: 0;
+ /* background: unset; */
+ /* padding: 0; */
+}
\ No newline at end of file