Skip to content

sc0tt5/nx-tour-of-heroes

Repository files navigation

Nx Tour of Heroes

An Nx Monorepo with Angular and Nest, Nest being used for Angular server-side rendering and as an API to fetch data from the database. This project repurposes the official Tour of Heroes tutorial with the intent of demonstrating the aforementioned setup.

Getting Started

This project was generated using Nx.

Installation

  • npm i

Development (client-side only rendering)

  • npm start which will run the database, the Nest API, and the Angular project using concurrently

Development (server-side rendering)

  • npm run dev:ssr

Production

  • npm run build:ssr && npm run serve:ssr

  • Compiles the application and serves it with Universal on the Nest server

Project Structure

<project-root>

├── apps
│   ├── api
│   └── tour-of-heroes
├── libs
│   ├── api # api app scope/library
│   ├── tour-of-heroes # toh app scope
│   │   ├── feature # toh feature libraries
│   │   │   ├── detail
│   │   │   ├── list
│   │   │   └── search
│   │   └── shared # shared for toh app
│   │       ├── data-access
│   │       └── ui
│   └── shared # shared with all apps
│       ├── data-access
│       ├── models
│       ├── ui
│       └── utils
├── tools
└── ...