This commit is contained in:
Parsa Yazdani 2024-07-04 18:37:56 +10:00
parent a17a228656
commit b570994c16
6 changed files with 64 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.DS_Store

5
Server/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
dist/*.js
yarn.lock
package-lock.json
node_modules/*

0
Server/dist/.gitkeep vendored Normal file
View file

5
Server/nodemon.json Normal file
View file

@ -0,0 +1,5 @@
{
"watch": ["src"],
"ext": "ts",
"exec": "ts-standard --fix && ts-node src/server.ts"
}

29
Server/package.json Normal file
View file

@ -0,0 +1,29 @@
{
"name": "instinct-server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node dist/server.js",
"dev": "nodemon",
"build": "npx tsc",
"format": "ts-standard --fix"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@types/express": "^4.17.21",
"@types/node": "^20.14.9",
"express": "^4.19.2",
"ts-node": "^10.9.2",
"typescript": "^5.5.3"
},
"devDependencies": {
"nodemon": "^3.1.4",
"ts-standard": "^12.0.2"
},
"ts-standard": {
"project": "./tsconfig.json"
}
}

23
Server/tsconfig.json Normal file
View file

@ -0,0 +1,23 @@
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./src",
"strict": true, // This enables all strict type-checking options
"noImplicitAny": true, // Raise error on expressions and declarations with an implied `any` type.
"strictNullChecks": true, // Ensure `null` and `undefined` are only assignable to themselves and `any` (use `--strict` to enable this flag).
"strictFunctionTypes": true, // Ensure function type compatibility is strict.
"strictBindCallApply": true, // Ensure `bind`, `call`, and `apply` methods on functions strictly enforce their declared `this` parameter and argument types.
"strictPropertyInitialization": true, // Ensure class properties are correctly initialized in the constructor.
"noImplicitThis": true, // Raise error on `this` expressions with an implied `any` type.
"alwaysStrict": true, // Ensure `use strict` is always emitted.
"noUnusedLocals": true, // Report errors on unused locals.
"noUnusedParameters": true, // Report errors on unused parameters.
"noImplicitReturns": true, // Ensure all code paths in a function return a value.
"noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch statements.
"esModuleInterop": true, // Enable compatibility with ECMAScript modules.
"skipLibCheck": true, // Skip type checking of declaration files.
"forceConsistentCasingInFileNames": true // Ensure file names are in consistent casing.
}
}