add initial frame, kodi api module, static serve module, settings, etc.

This commit is contained in:
Jurgis Sakalauskas
2022-12-05 09:59:18 +02:00
parent 40e9244e31
commit 1ad27b4e8f
24 changed files with 15285 additions and 0 deletions
@@ -0,0 +1,16 @@
import { NestMiddleware } from '@nestjs/common';
import { NextFunction } from 'express';
import { Request, Response } from 'express';
import { join } from 'path';
export class KodiApiUrlRewriteMiddleware implements NestMiddleware {
async use(req: Request, res: Response, next: NextFunction) {
let path: string;
if (req.query && req.query.path) {
path = req.query.path as string;
}
req.url = join('/api/', path);
next();
}
}