Skip to content

Instantly share code, notes, and snippets.

@intelguasoft
Created April 12, 2020 05:05
Show Gist options
  • Select an option

  • Save intelguasoft/d426797dbd75c822dd6b5904fde55852 to your computer and use it in GitHub Desktop.

Select an option

Save intelguasoft/d426797dbd75c822dd6b5904fde55852 to your computer and use it in GitHub Desktop.
Servir una carpeta publica en nestjs
import { Module } from '@nestjs/common';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
import { AppController } from './app.controller';
@Module({
imports: [
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', 'client'),
exclude: ['/api*'],
}),
],
controllers: [AppController],
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment