File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,8 @@ const app = await NestFactory.create<NestExpressApplication>(AppModule);
186
186
$ npm run start
187
187
```
188
188
189
+ ?> 为了加快开发过程(构建速度快x20倍),您可以使用 [ SWC builder] ( /recipes/swc ) 请将 ` -b swc ` 标志传递给 ` start ` 脚本, 比如这样 ` npm run start -- -b swc ` .
190
+
189
191
此命令启动 HTTP 服务监听定义在 ` src/main.ts ` 文件中定义的端口号。在应用程序运行后, 打开浏览器并访问 ` http://localhost:3000/ ` 。 你应该看到 ` Hello world! ` 信息。
190
192
191
193
要监听文件中的更改,您可以运行以下命令来启动应用程序:
@@ -195,6 +197,17 @@ $ npm run start:dev
195
197
196
198
此命令将监听您的文件,自动重新编译并重新加载服务器。
197
199
200
+
201
+ #### 检查工具和格式化工具
202
+
203
+ [ CLI] ( /cli/overview ) 提供一个可靠的大规模开发工作流框架。因此生成的 Nest 项目默认集成了代码检查工具和格式化工具(分别是 [ eslint] ( https://eslint.org/ ) 和 [ prettier] ( https://prettier.io/ ) )。
204
+
205
+ ?> 如果您不确定格式化工具和检查工具的作用区别。Not sure about the role of formatters vs linters? 点击 [ 这里] ( https://prettier.io/docs/en/comparison.html ) 了解区别。
206
+
207
+ 为了确保最大的稳定性和可扩展性,我们使用了 [ ` eslint ` ] ( https://www.npmjs.com/package/eslint ) 和 [ ` prettier ` ] ( https://www.npmjs.com/package/prettier ) 的基础工具包。这种预设从设计上允许与官方(指Eslint,Prettier)的扩展进行整洁的IDE集成。
208
+
209
+ 对于不需要IDE的无头环境(如持续集成、Git钩子等),Nest项目自带了开箱即用的 ` npm ` 脚本。
210
+
198
211
** [ 学习资料] ( https://docs.nestjs.cn/10/awesome?id=%e7%9b%b8%e5%85%b3%e8%b5%84%e6%ba%90 ) **
199
212
200
213
### 支持我们
@@ -216,4 +229,5 @@ $ npm run start:dev
216
229
| 用户名 | 头像 | 职能 | 签名 |
217
230
| ---------| --------------| -------------| ---------------|
218
231
| [ @qianfeiqianlan ] ( https://www.zhihu.com/people/li-yang-yang-94-14 ) | <img class =" avatar-66 rm-style " width =' 100 ' src =" https://avatars.githubusercontent.com/u/12892568?v=4 " > | 校正 | 全栈开发工程师,专注于效能提升、DevOps、架构设计等领域[ @qianfeiqianlan ] ( https://github.com/qianfeiqianlan ) at Github |
232
+ | [ @IOLOII ] ( https://github.com/IOLOII ) | <img class =" avatar-66 rm-style " width =' 100 ' src =" https://avatars.githubusercontent.com/u/34856171?v=4 " > | 校正 | 如果编程无法改变未来, 那为什么要成为程序员? [ @IOLOII ] ( https://github.com/IOLOII ) at Github |
219
233
You can’t perform that action at this time.
0 commit comments