feat: init
This commit is contained in:
8
apps/mock/nest-cli.json
Normal file
8
apps/mock/nest-cli.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/nest-cli",
|
||||
"collection": "@nestjs/schematics",
|
||||
"sourceRoot": "src",
|
||||
"compilerOptions": {
|
||||
"deleteOutDir": true
|
||||
}
|
||||
}
|
||||
25
apps/mock/package.json
Normal file
25
apps/mock/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "mock",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "nest start --watch -b swc",
|
||||
"dev": "pnpm run start"
|
||||
},
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nestjs/common": "^11.0.11",
|
||||
"@nestjs/config": "^4.0.1",
|
||||
"@nestjs/core": "^11.0.11",
|
||||
"@nestjs/platform-express": "^11.0.11",
|
||||
"@nestjs/serve-static": "^5.0.3",
|
||||
"reflect-metadata": "^0.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^11.0.0",
|
||||
"@nestjs/schematics": "^11.0.0",
|
||||
"@swc/cli": "^0.6.0",
|
||||
"@swc/core": "^1.11.8"
|
||||
}
|
||||
}
|
||||
BIN
apps/mock/public/video-sample/audiosample.webm
Normal file
BIN
apps/mock/public/video-sample/audiosample.webm
Normal file
Binary file not shown.
BIN
apps/mock/public/video-sample/test.webm
Normal file
BIN
apps/mock/public/video-sample/test.webm
Normal file
Binary file not shown.
BIN
apps/mock/public/video-sample/video-webm-codecs-avc1-42E01E.webm
Normal file
BIN
apps/mock/public/video-sample/video-webm-codecs-avc1-42E01E.webm
Normal file
Binary file not shown.
BIN
apps/mock/public/video-sample/video-webm-codecs-vp8.webm
Normal file
BIN
apps/mock/public/video-sample/video-webm-codecs-vp8.webm
Normal file
Binary file not shown.
19
apps/mock/src/app.module.ts
Normal file
19
apps/mock/src/app.module.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ServeStaticModule } from '@nestjs/serve-static';
|
||||
import path from 'node:path';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ServeStaticModule.forRoot({
|
||||
rootPath: path.join(__dirname, '..', 'public'),
|
||||
serveRoot: '/api/static',
|
||||
serveStaticOptions: {
|
||||
cacheControl: true,
|
||||
maxAge: '1d',
|
||||
},
|
||||
})
|
||||
],
|
||||
controllers: [],
|
||||
providers: [],
|
||||
})
|
||||
export class AppModule { }
|
||||
8
apps/mock/src/main.ts
Normal file
8
apps/mock/src/main.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
await app.listen(process.env.port ?? 5001);
|
||||
}
|
||||
bootstrap();
|
||||
28
apps/mock/tsconfig.json
Normal file
28
apps/mock/tsconfig.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": false,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"allowImportingTsExtensions": false,
|
||||
"outDir": "./dist",
|
||||
"rootDir": ".",
|
||||
"baseUrl": ".",
|
||||
"lib": [
|
||||
"ES2024"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist",
|
||||
"test",
|
||||
"**/*spec.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user