NestJack NXプラグインを追加し、サーバーアプリケーションとコアlibを作成します
4479 ワード
NSTXへのNESTJSプラグインをインストールしてください
npm install -D @nrwl/nest
endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ npm install -D @nrwl/nest
added 158 packages, and audited 623 packages in 18s
78 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
パッケージにNXスクリプトを加えます.JSON
"scripts": {
"nx": "nx",
"start": "nx serve",
"build": "nx build",
"test": "nx test"
},
サーバーの作成
npm run -- nx g @nrwl/nest:app server
endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ npm run -- nx g @nrwl/nest:app server
> [email protected] nx
> nx "g" "@nrwl/nest:app" "server"
UPDATE workspace.json
UPDATE nx.json
CREATE jest.config.js
CREATE jest.preset.js
UPDATE package.json
UPDATE .vscode/extensions.json
CREATE apps/server/src/app/.gitkeep
CREATE apps/server/src/assets/.gitkeep
CREATE apps/server/src/environments/environment.prod.ts
CREATE apps/server/src/environments/environment.ts
CREATE apps/server/src/main.ts
CREATE apps/server/tsconfig.app.json
CREATE apps/server/tsconfig.json
CREATE apps/server/project.json
CREATE .eslintrc.json
CREATE apps/server/.eslintrc.json
CREATE apps/server/jest.config.js
CREATE apps/server/tsconfig.spec.json
CREATE apps/server/src/app/app.controller.spec.ts
CREATE apps/server/src/app/app.controller.ts
CREATE apps/server/src/app/app.module.ts
CREATE apps/server/src/app/app.service.spec.ts
CREATE apps/server/src/app/app.service.ts
added 230 packages, removed 5 packages, changed 3 packages, and audited 848 packages in 43s
105 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
up to date, audited 848 packages in 3s
105 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
ライブラリ作成
npm run -- nx g @nrwl/nest:lib core/server
endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ npm run -- nx g @nrwl/nest:lib core/server
> [email protected] nx
> nx "g" "@nrwl/nest:lib" "core/server"
CREATE libs/core/server/README.md
CREATE libs/core/server/.babelrc
CREATE libs/core/server/src/index.ts
CREATE libs/core/server/tsconfig.json
CREATE libs/core/server/tsconfig.lib.json
UPDATE tsconfig.base.json
CREATE libs/core/server/project.json
UPDATE workspace.json
CREATE libs/core/server/.eslintrc.json
CREATE libs/core/server/jest.config.js
CREATE libs/core/server/tsconfig.spec.json
CREATE libs/core/server/src/lib/core-server.module.ts
Reference
この問題について(NestJack NXプラグインを追加し、サーバーアプリケーションとコアlibを作成します), 我々は、より多くの情報をここで見つけました https://dev.to/endykaufman/add-nestjs-nx-plugin-create-server-app-and-core-lib-1l3oテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol