Skip to content

Commit

Permalink
Added Nest devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpetro committed Feb 11, 2024
1 parent bae5d3b commit 065dc08
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.1.1",
"@nestjs/core": "^10.0.0",
"@nestjs/devtools-integration": "^0.1.6",
"@nestjs/platform-express": "^10.0.0",
"@types/cors": "^2.8.17",
"axios": "^1.6.7",
Expand Down
17 changes: 17 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ import { AppController } from '@/app.controller'
import { AppService } from '@/app.service'
import { ConfigModule } from '@nestjs/config'
import { IrrigationEventsModule } from './irrigation-events/irrigation-events.module'
import { DevtoolsModule } from '@nestjs/devtools-integration'

@Module({
imports: [ConfigModule.forRoot({ envFilePath: '.env.local' }), IrrigationEventsModule],
imports: [
DevtoolsModule.register({ http: process.env.NODE_ENV !== 'production' }),
ConfigModule.forRoot({ envFilePath: '.env.local' }),
IrrigationEventsModule,
],
controllers: [AppController],
providers: [AppService],
})
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core'
import { AppModule } from '@/app.module'

async function bootstrap() {
const app = await NestFactory.create(AppModule, { cors: true })
const app = await NestFactory.create(AppModule, { cors: true, snapshot: true })
app.enableShutdownHooks()
await app.listen(3000)
}
Expand Down

0 comments on commit 065dc08

Please sign in to comment.