Added static serving and concurrently for dev

This commit is contained in:
2021-07-30 17:36:58 -04:00
parent 1a9afdc2b8
commit e5ef4d8847
3 changed files with 463 additions and 307 deletions

View File

@@ -1,10 +1,16 @@
import { Module } from '@nestjs/common';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
import { AppController } from './app.controller';
import { AppService } from './app.service';
@Module({
imports: [],
imports: [
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', 'client'),
}),
],
controllers: [AppController],
providers: [AppService],
})

757
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,10 +7,13 @@
"postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2015 browser module main",
"nx": "nx",
"start": "ng serve",
"start:fe": "ng serve client",
"start:be": "ng serve api",
"build": "ng build",
"test": "ng test",
"lint": "nx workspace-lint && ng lint",
"e2e": "ng e2e",
"dev": "concurrently -p=\"{name}\" -n=\"Angular,NestJS\" -c=\"green,blue\" \"npm run start:fe\" \"npm run start:be\"",
"affected:apps": "nx affected:apps",
"affected:libs": "nx affected:libs",
"affected:build": "nx affected:build",
@@ -40,6 +43,7 @@
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0",
"@nestjs/platform-express": "^7.0.0",
"@nestjs/serve-static": "^2.2.2",
"@nrwl/angular": "12.6.3",
"reflect-metadata": "^0.1.13",
"rxjs": "~6.6.0",
@@ -69,6 +73,7 @@
"@types/node": "14.14.33",
"@typescript-eslint/eslint-plugin": "~4.28.3",
"@typescript-eslint/parser": "~4.28.3",
"concurrently": "^6.2.0",
"cypress": "^7.3.0",
"dotenv": "~10.0.0",
"eslint": "7.22.0",