Skip to content

Commit fec4733

Browse files
authored
Автоматизация запуска для VS Code (#667)
* feat: add start script for vs code * update readme * fix: readme
1 parent c94a3d9 commit fec4733

2 files changed

Lines changed: 201 additions & 1 deletion

File tree

.vscode/tasks.json

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Start All",
6+
"dependsOn": ["Start Backend", "Start Frontend"],
7+
"dependsOrder": "parallel",
8+
"problemMatcher": []
9+
},
10+
{
11+
"label": "Start Backend",
12+
"dependsOn": [
13+
"Start AuthService.API",
14+
"Start CoursesService.API",
15+
"Start SolutionsService.API",
16+
"Start NotificationsService.API",
17+
"Start ContentService.API",
18+
"Start APIGateway.API"
19+
],
20+
"dependsOrder": "parallel",
21+
"problemMatcher": []
22+
},
23+
{
24+
"label": "Start APIGateway.API",
25+
"type": "process",
26+
"command": "dotnet",
27+
"args": [
28+
"run",
29+
"--project",
30+
"${workspaceFolder}/HwProj.APIGateway/HwProj.APIGateway.API/HwProj.APIGateway.API.csproj"
31+
],
32+
"isBackground": true,
33+
"presentation": {
34+
"reveal": "always",
35+
"panel": "new",
36+
"clear": false
37+
},
38+
"problemMatcher": {
39+
"owner": "aspnetcore",
40+
"pattern": [{ "regexp": ".+" }],
41+
"background": {
42+
"activeOnStart": true,
43+
"beginsPattern": ".+",
44+
"endsPattern": "Now listening on:|Application started\\."
45+
}
46+
}
47+
},
48+
{
49+
"label": "Start AuthService.API",
50+
"type": "process",
51+
"command": "dotnet",
52+
"args": [
53+
"run",
54+
"--project",
55+
"${workspaceFolder}/HwProj.AuthService/HwProj.AuthService.API/HwProj.AuthService.API.csproj"
56+
],
57+
"isBackground": true,
58+
"presentation": {
59+
"reveal": "always",
60+
"panel": "new",
61+
"clear": false
62+
},
63+
"problemMatcher": {
64+
"owner": "aspnetcore",
65+
"pattern": [{ "regexp": ".+" }],
66+
"background": {
67+
"activeOnStart": true,
68+
"beginsPattern": ".+",
69+
"endsPattern": "Now listening on:|Application started\\."
70+
}
71+
}
72+
},
73+
{
74+
"label": "Start CoursesService.API",
75+
"type": "process",
76+
"command": "dotnet",
77+
"args": [
78+
"run",
79+
"--project",
80+
"${workspaceFolder}/HwProj.CoursesService/HwProj.CoursesService.API/HwProj.CoursesService.API.csproj"
81+
],
82+
"isBackground": true,
83+
"presentation": {
84+
"reveal": "always",
85+
"panel": "new",
86+
"clear": false
87+
},
88+
"problemMatcher": {
89+
"owner": "aspnetcore",
90+
"pattern": [{ "regexp": ".+" }],
91+
"background": {
92+
"activeOnStart": true,
93+
"beginsPattern": ".+",
94+
"endsPattern": "Now listening on:|Application started\\."
95+
}
96+
}
97+
},
98+
{
99+
"label": "Start SolutionsService.API",
100+
"type": "process",
101+
"command": "dotnet",
102+
"args": [
103+
"run",
104+
"--project",
105+
"${workspaceFolder}/HwProj.SolutionsService/HwProj.SolutionsService.API/HwProj.SolutionsService.API.csproj"
106+
],
107+
"isBackground": true,
108+
"presentation": {
109+
"reveal": "always",
110+
"panel": "new",
111+
"clear": false
112+
},
113+
"problemMatcher": {
114+
"owner": "aspnetcore",
115+
"pattern": [{ "regexp": ".+" }],
116+
"background": {
117+
"activeOnStart": true,
118+
"beginsPattern": ".+",
119+
"endsPattern": "Now listening on:|Application started\\."
120+
}
121+
}
122+
},
123+
{
124+
"label": "Start NotificationsService.API",
125+
"type": "process",
126+
"command": "dotnet",
127+
"args": [
128+
"run",
129+
"--project",
130+
"${workspaceFolder}/HwProj.NotificationsService/HwProj.NotificationsService.API/HwProj.NotificationsService.API.csproj"
131+
],
132+
"isBackground": true,
133+
"presentation": {
134+
"reveal": "always",
135+
"panel": "new",
136+
"clear": false
137+
},
138+
"problemMatcher": {
139+
"owner": "aspnetcore",
140+
"pattern": [{ "regexp": ".+" }],
141+
"background": {
142+
"activeOnStart": true,
143+
"beginsPattern": ".+",
144+
"endsPattern": "Now listening on:|Application started\\."
145+
}
146+
}
147+
},
148+
{
149+
"label": "Start ContentService.API",
150+
"type": "process",
151+
"command": "dotnet",
152+
"args": [
153+
"run",
154+
"--project",
155+
"${workspaceFolder}/HwProj.ContentService/HwProj.ContentService.API/HwProj.ContentService.API.csproj"
156+
],
157+
"isBackground": true,
158+
"presentation": {
159+
"reveal": "always",
160+
"panel": "new",
161+
"clear": false
162+
},
163+
"problemMatcher": {
164+
"owner": "aspnetcore",
165+
"pattern": [{ "regexp": ".+" }],
166+
"background": {
167+
"activeOnStart": true,
168+
"beginsPattern": ".+",
169+
"endsPattern": "Now listening on:|Application started\\."
170+
}
171+
}
172+
},
173+
{
174+
"label": "Start Frontend",
175+
"type": "process",
176+
"command": "npm",
177+
"args": ["run", "dev"],
178+
"options": {
179+
"cwd": "${workspaceFolder}/hwproj.front"
180+
},
181+
"isBackground": true,
182+
"presentation": {
183+
"reveal": "always",
184+
"panel": "new",
185+
"clear": false
186+
},
187+
"problemMatcher": {
188+
"owner": "vite",
189+
"pattern": [{ "regexp": ".+" }],
190+
"background": {
191+
"activeOnStart": true,
192+
"beginsPattern": ".+",
193+
"endsPattern": "Local:|ready in"
194+
}
195+
}
196+
}
197+
]
198+
}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ HwProj — это веб-сервис, созданный для автомат
7373

7474
В Visual Studio - запустить сервисы ApiGateway.API, AuthService.API, CoursesService.API, SolutionsService.API, NotificationsService.API, ContentService.API
7575

76+
В Visual Studio Code - запустить задачу Start All (Terminal -> Run Task... -> StartAll) или Start Backend
77+
7678
#### Фронтенд
77-
0. Вызвать `npm run dev` в `HwProj-2.0.1/hwproj.front` (Start All в Rider запустит и фронтенд)
79+
0. Вызвать `npm run dev` в `HwProj-2.0.1/hwproj.front` (Start All в Rider и VSCode запустит и фронтенд)
7880

7981
### Генерация ts-клиента после изменения контрактов ApiGateway
8082
0. Запустить ApiGateway

0 commit comments

Comments
 (0)