0.0.2 • Published 2 years ago

@ynnck/demo v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Nest-Nguniversal

A Nx plugin to integrate NestJS server with a server side rendered Angular application.

Conceptually a NestJS server serves an Angular Universal application. Besides serving the application NestJS functionality can be used as usual. The server uses the AngularUniversalModule provided by @nxarch/ng-universal

@nxarch/nxarch commitizen PRs coc-badge semantic-release styled with prettier

Prerequisites

You need a NestJS application and a Angular application in the same workspace.

Installation

npm i @nxarch/nest-nguniversal
yarn add @nxarch/nest-nguniversal

Setup

Use the provided generator to setup all files. If you don't have an Angular and a NestJS app refer to this part on how to generate these applications.

yarn nx generate @nxarch/ng-nest:init --ssrApp=my-angular-project --serverApp=my-nestjs-project

App Start

Use the added target in the server configuration file.

yarn nx run my-nestjs-project:serve-ssr

Setup Nx apps (if not already setup)

Setup an Angular app and a NestJS app

yarn add --dev @nrwl/angular @nrwl/nest
yarn nx generate @nrwl/angular:app
yarn nx generate @nrwl/nest:app

Configuration

For configuring the AngularUniversalModule refer to @nxarch/ng-universal .

Contributing

See the contributing file!

PRs accepted.

License

MIT © 2022 nxarch