Skip to content

Commit

Permalink
feat: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Oct 12, 2024
1 parent 13466b0 commit 58d77ce
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/vite-vue/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { defineConfig } from 'vite'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import istanbul from 'vite-plugin-istanbul'
import canyon from 'vite-plugin-canyon'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
istanbul({
forceBuildInstrument:true
}),
forceBuildInstrument: true
}),
canyon()
],
})
2 changes: 2 additions & 0 deletions packages/canyon-backend/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { join } from "path";
import { ServeStaticModule } from "@nestjs/serve-static";
import { TypeOrmModule } from "@nestjs/typeorm";
import { CoveragediskEntity } from "./coverage/entity/coveragedisk.entity";
import { PlaygroundModule } from "./playground/playground.module";

@Module({
imports: [
Expand All @@ -33,6 +34,7 @@ import { CoveragediskEntity } from "./coverage/entity/coveragedisk.entity";
CoverageModule,
CodechangeModule,
SourcecodeModule,
PlaygroundModule,
ServeStaticModule.forRoot({
rootPath: join(__dirname, "..", "public"),
exclude: ["/graphql/(.*)"],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Controller } from "@nestjs/common";
import { PrismaService } from "../prisma/prisma.service";

@Controller()
export class PlaygroundController {
constructor(private readonly prismaService: PrismaService) {
console.log("PlaygroundController created");
}
}
12 changes: 12 additions & 0 deletions packages/canyon-backend/src/playground/playground.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Module } from "@nestjs/common";
import { PlaygroundService } from "./playground.service";
import { PrismaModule } from "src/prisma/prisma.module";
import { PlaygroundController } from "./playground.controller";

@Module({
imports: [PrismaModule],
controllers: [PlaygroundController],
providers: [PlaygroundService],
exports: [PlaygroundService],
})
export class PlaygroundModule {}
6 changes: 6 additions & 0 deletions packages/canyon-backend/src/playground/playground.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Injectable } from "@nestjs/common";
import { PrismaService } from "src/prisma/prisma.service";
@Injectable()
export class PlaygroundService {
constructor(private prisma: PrismaService) {}
}

0 comments on commit 58d77ce

Please sign in to comment.