Skip to content

Instantly share code, notes, and snippets.

@bussiere
Created March 26, 2022 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bussiere/c1ed49fdb9edb9eda64eebb5b9052878 to your computer and use it in GitHub Desktop.
Save bussiere/c1ed49fdb9edb9eda64eebb5b9052878 to your computer and use it in GitHub Desktop.
import { Module } from '@nestjs/common';
import { ServeStaticModule } from '@nestjs/serve-static';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { join } from 'path';
// we serve the static content from the html folder
@Module({
imports: [
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', 'html'),
})
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment