Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add orm #30

Merged
merged 13 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .git-hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

# fix for windows systems
PATH="c:/Program Files/nodejs:$HOME/AppData/Roaming/npm/:$PATH"

npx git-conventional-commits commit-msg-hook "$1"
8 changes: 1 addition & 7 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/go/build-context-dockerignore/

**/.classpath
**/.dockerignore
**/.env
Expand Down Expand Up @@ -31,4 +25,4 @@
**/build
**/dist
LICENSE
README.md
README.md
6 changes: 6 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea/
.vscode/
node_modules/
build/
tmp/
temp/
23 changes: 0 additions & 23 deletions backend/README.Docker.md

This file was deleted.

4 changes: 2 additions & 2 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- Отформатировать код
- Запустить линтер
- Исправить замечания линтера
- Исправить замечания линтера
- Запустить тесты
- Комит и пуш в репозиторий

Expand All @@ -16,4 +16,4 @@ npm test
```
git add .
git commit -m "commit message"
```
```
13 changes: 13 additions & 0 deletions backend/ormconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "postgres",
AleksanderNekr marked this conversation as resolved.
Show resolved Hide resolved
"host": "127.0.0.1",
"port": 5432,
"username": "postgres",
"password": "postgres",
"database": "courses",
"synchronize": true,
"logging": true,
"entities": [
"src/models/*.ts"
]
}
34 changes: 24 additions & 10 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,48 @@
"name": "backend",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"main": "src/index.ts",
"scripts": {
"start": "npx tsx src/index.ts",
"start": "npx tsx ./src/index.ts",
"dev": "nodemon ./src/index.ts localhost 3000",
"lint": "eslint",
"lint:fix": "eslint --fix",
"prettify": "pnpm prettier . --write",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"typeorm": "typeorm-ts-node-esm"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "module",
"dependencies": {
"express": "^4.19.2",
"node": "^18.20.2",
"@types/express": "^4.17.21",
"bcrypt": "^5.1.1",
"express": "^4.17.2",
"node": "v21.6.1",
"nodemon": "^3.1.0",
"npx": "^10.2.2",
"pg": "^8.4.0",
"prettier": "^3.2.5",
"reflect-metadata": "^0.1.13",
"tpx": "0.0.1-beta.1",
"ts-node": "^10.9.2",
"tsx": "^4.7.2"
"tsx": "^4.9.3",
"typeorm": "0.3.20",
"body-parser": "^1.19.1"
},
"devDependencies": {
"@eslint/js": "^9.1.1",
"@eslint/js": "^9.2.0",
"@tsconfig/node-lts-strictest-esm": "^18.12.1",
"eslint": "^9.1.0",
"globals": "^15.0.0",
"typescript-eslint": "^7.7.0"
"@types/bcrypt": "^5.0.2",
"@types/node": "^16.11.10",
"eslint": "^8.57.0",
"globals": "^15.2.0",
"typescript": "4.5.2",
"typescript-eslint": "^7.8.0",
"ts-node": "10.9.1"
},
"overrides": {
"tsconfig-paths": "^4.0.0"
}
}
Loading
Loading