nest-spa-serve
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Nest-SPA-Serve

Single Page Application delivery server module for NestJS

Usage

import { Module } from "@nestjs/common";
import { SPAClientModule } from "nest-spa-serve";
import { join } from "path";
import config from "../webpack.config";
import { AppController } from "./app.controller";
import { AppService } from "./app.service";
 
@Module({
  imports: [
    SPAClientModule.forRoot({
      // URL path where the SPA is provided
      renderPath: "/",
      // Directory of static file (index.html)
      rootPath: join(process.cwd(), "public"),
      // webpack.config.js for frontend
      webpackConfig: config,
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    0
    • latest

Version History

Package Sidebar

Install

npm i nest-spa-serve

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

12.5 kB

Total Files

21

Last publish

Collaborators

  • naporin0624