Compare commits
9 commits
02938810e0
...
517b093b20
Author | SHA1 | Date | |
---|---|---|---|
517b093b20 | |||
4e93da5488 | |||
077c2bd38a | |||
4447d7e15b | |||
11436c3e5a | |||
95af0ea1fb | |||
6b62422903 | |||
7e2d7c0234 | |||
ff27aa1cb3 |
6 changed files with 733 additions and 70 deletions
19
.vscode/launch.json
vendored
19
.vscode/launch.json
vendored
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"type": "chrome",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "Launch Website in Chrome",
|
|
||||||
"url": "http://localhost:3000",
|
|
||||||
"webRoot": "${workspaceFolder}/packages/game/lib/static",
|
|
||||||
"preLaunchTask": "Build",
|
|
||||||
"pathMapping": {
|
|
||||||
"/": "${workspaceFolder}/packages/game/src"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -23,7 +23,8 @@
|
||||||
"html.format.extraLiners": "",
|
"html.format.extraLiners": "",
|
||||||
"html.format.indentInnerHtml": true,
|
"html.format.indentInnerHtml": true,
|
||||||
"html.format.maxPreserveNewLines": 1,
|
"html.format.maxPreserveNewLines": 1,
|
||||||
"html.format.wrapAttributes": "preserve-aligned"
|
"html.format.wrapAttributes": "preserve-aligned",
|
||||||
|
"npm.packageManager": "npm"
|
||||||
},
|
},
|
||||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
// for the documentation about the tasks.json format
|
// for the documentation about the tasks.json format
|
||||||
|
@ -32,8 +33,15 @@
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "Build",
|
"label": "Build",
|
||||||
"type": "npm",
|
"type": "shell",
|
||||||
"script": "watch",
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder:Solution Items}"
|
||||||
|
},
|
||||||
|
"command": "npm",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"watch"
|
||||||
|
],
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
|
@ -62,8 +70,15 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Rebuild",
|
"label": "Rebuild",
|
||||||
"type": "npm",
|
"type": "shell",
|
||||||
"script": "rebuild",
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder:Solution Items}"
|
||||||
|
},
|
||||||
|
"command": "npm",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"rebuild"
|
||||||
|
],
|
||||||
"problemMatcher": [],
|
"problemMatcher": [],
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"reveal": "never"
|
"reveal": "never"
|
||||||
|
@ -71,8 +86,15 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Lint",
|
"label": "Lint",
|
||||||
"type": "npm",
|
"type": "shell",
|
||||||
"script": "lint-ide",
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder:Solution Items}"
|
||||||
|
},
|
||||||
|
"command": "npm",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"lint-ide"
|
||||||
|
],
|
||||||
"problemMatcher": "$eslint-stylish",
|
"problemMatcher": "$eslint-stylish",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"reveal": "never"
|
"reveal": "never"
|
||||||
|
@ -95,10 +117,31 @@
|
||||||
"preLaunchTask": "Build",
|
"preLaunchTask": "Build",
|
||||||
"pathMapping": {
|
"pathMapping": {
|
||||||
"/": "${workspaceFolder:ConnectForce}/src"
|
"/": "${workspaceFolder:ConnectForce}/src"
|
||||||
|
},
|
||||||
|
"presentation": {
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Launch Server",
|
||||||
|
"program": "${workspaceFolder:Server}/src/main.js",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"presentation": {
|
||||||
|
"hidden": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"compounds": []
|
"compounds": [
|
||||||
|
{
|
||||||
|
"name": "Launch Project in Chrome",
|
||||||
|
"configurations": [
|
||||||
|
"Launch Website in Chrome",
|
||||||
|
"Launch Server"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
|
|
693
package-lock.json
generated
693
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"rebuild": "npm run --workspaces rebuild",
|
"rebuild": "npm run --workspaces rebuild",
|
||||||
"watch": "npm run --workspaces watch",
|
"watch": "concurrently --raw \"npm run --workspaces --if-present watch\"",
|
||||||
"clean": "npm run --workspaces clean",
|
"clean": "npm run --workspaces clean",
|
||||||
"lint-local": "eslint --max-warnings 0 .eslintrc.cjs",
|
"lint-local": "eslint --max-warnings 0 .eslintrc.cjs",
|
||||||
"lint-local-ide": "npm run lint-local || exit 0",
|
"lint-local-ide": "npm run lint-local || exit 0",
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@manuth/eslint-plugin-typescript": "^4.0.1",
|
"@manuth/eslint-plugin-typescript": "^4.0.1",
|
||||||
|
"concurrently": "^7.6.0",
|
||||||
"eslint": "^8.29.0"
|
"eslint": "^8.29.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,5 +5,13 @@
|
||||||
"description": "A server for Storing ConnectForce Savegames",
|
"description": "A server for Storing ConnectForce Savegames",
|
||||||
"author": "Manuel Thalmann <m@nuth.ch>",
|
"author": "Manuel Thalmann <m@nuth.ch>",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"start": "noderel -e ./src/main.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.18.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/express": "^4.17.15",
|
||||||
|
"noderel": "^1.0.13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
import express from "express";
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
app.use(
|
||||||
|
(request, response, next) =>
|
||||||
|
{
|
||||||
|
response.send("Hello World");
|
||||||
|
response.status(100);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.use(
|
||||||
|
[
|
||||||
|
(error, request, response, next) =>
|
||||||
|
{
|
||||||
|
response.send(`${error}`);
|
||||||
|
response.status(error?.status ?? 500);
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
app.listen(1337);
|
Loading…
Reference in a new issue