-
-
Save SteadEXE/2220524c25cbd59ab04ce5d772d7b56e to your computer and use it in GitHub Desktop.
Deprecated warning fastify-static
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Module} from '@nestjs/common'; | |
import {ServeStaticModule} from "@nestjs/serve-static"; | |
import {join} from 'path'; | |
@Module({ | |
imports: [ | |
ServeStaticModule.forRoot({ | |
rootPath: join(__dirname, '..', 'public') | |
}), | |
], | |
controllers: [], | |
providers: [], | |
}) | |
export class AppModule { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {NestFactory} from '@nestjs/core'; | |
import {AppModule} from './app.module'; | |
import {FastifyAdapter, NestFastifyApplication} from "@nestjs/platform-fastify"; | |
async function bootstrap() { | |
const app = await NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter()); | |
await app.listen(process.env.LISTEN_PORT || 3000); | |
} | |
bootstrap(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment