diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9bea433 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +.DS_Store diff --git a/Server/.gitignore b/Server/.gitignore new file mode 100644 index 0000000..2afd6cc --- /dev/null +++ b/Server/.gitignore @@ -0,0 +1,5 @@ +dist/*.js + +yarn.lock +package-lock.json +node_modules/* \ No newline at end of file diff --git a/Server/dist/.gitkeep b/Server/dist/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Server/nodemon.json b/Server/nodemon.json new file mode 100644 index 0000000..37a4452 --- /dev/null +++ b/Server/nodemon.json @@ -0,0 +1,5 @@ +{ + "watch": ["src"], + "ext": "ts", + "exec": "ts-standard --fix && ts-node src/server.ts" +} diff --git a/Server/package.json b/Server/package.json new file mode 100644 index 0000000..0c449f1 --- /dev/null +++ b/Server/package.json @@ -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" + } +} diff --git a/Server/tsconfig.json b/Server/tsconfig.json new file mode 100644 index 0000000..333d1f8 --- /dev/null +++ b/Server/tsconfig.json @@ -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. + } +}