mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-08 20:37:41 +00:00
add initial frame, kodi api module, static serve module, settings, etc.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import {
|
||||
MiddlewareConsumer,
|
||||
Module,
|
||||
NestModule,
|
||||
RequestMethod,
|
||||
} from '@nestjs/common';
|
||||
import { ServeStaticModule } from '@nestjs/serve-static';
|
||||
import { join } from 'path';
|
||||
import { StaticController } from './static.controller';
|
||||
import { RemoveQueryUrlRewriteMiddleware } from './UrlRewrite/url-rewrite.middleware';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ServeStaticModule.forRoot({
|
||||
rootPath: join(__dirname, '../../../static'),
|
||||
}),
|
||||
],
|
||||
controllers: [StaticController],
|
||||
providers: [],
|
||||
})
|
||||
export class StaticModule implements NestModule {
|
||||
configure(consumer: MiddlewareConsumer) {
|
||||
consumer
|
||||
.apply(RemoveQueryUrlRewriteMiddleware)
|
||||
.forRoutes({ path: '/*', method: RequestMethod.ALL });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user