Skip to content

Commit

Permalink
refactor all the server coce to app folder and add test folder and jest
Browse files Browse the repository at this point in the history
  • Loading branch information
algebra2boy committed Jan 17, 2024
1 parent a5b3bda commit 49a6fda
Show file tree
Hide file tree
Showing 32 changed files with 2,021 additions and 109 deletions.
11 changes: 11 additions & 0 deletions api/jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"preset": "ts-jest",
"testEnvironment": "node",
"transform": {
"^.+\\.{ts}?$": [
"ts-jest", {
"useESM": true
}
]
}
}
12 changes: 9 additions & 3 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"type": "module",
"scripts": {
"build": "tsc",
"start:docker": "pm2-runtime start src/server.ts --name backend -i 5",
"start": "ts-node src/server.ts",
"dev": "nodemon src/server.ts",
"start:docker": "pm2-runtime start src/app/server.ts --name backend -i 5",
"start": "ts-node src/app/server.ts",
"dev": "nodemon src/app/server.ts",
"test": "jest app/tests",
"format": "prettier --write src/ --config .prettierrc",
"lint": "eslint src/ --config .eslintrc.json"
},
Expand Down Expand Up @@ -47,5 +48,10 @@
"typescript": "^5.3.3",
"winston": "^3.11.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"jest": "^29.7.0",
"ts-jest": "^29.1.1"
}
}
Loading

0 comments on commit 49a6fda

Please sign in to comment.