Dockerized simple web app template with Angular v11 + NestJS + OpenAPI Generator.
Deployable on Heroku and other Docker base servers. HMR enabled. CI enabled with GitHub Actions.
This repository is deprecated. Instead, I have created a new version that works with or without Docker.
-> https://github.com/mugifly/angular-nest
- Angular v11 -- for Frontend app.
- NestJS v7 -- for Backend app.
- OpenAPI Generator CLI -- for to generate an API Client (between Angular and NestJS).
- Docker -- for Development & Production environment.
- Docker Compose -- for Development environment.
- Lerna -- for make a Monorepo structure that to have Frontend and Backend in a single repository.
- Karma + Jasmine -- for Unit testing of Frontend (with Puppeteer + Headless Chromium)
- Jest -- for Unit testing of Backend
- GitHub Actions -- for CI
This app supports deploying as a production environment to Heroku (with Heroku Button) or other Docker based server. Also, you don't have to do the build process locally or CI
Before you start, you should install the following software:
-
Node.js
-
Visual Studio Code
-
Docker
-
Docker Compose
Then execute as the following in your terminal:
$ git clone git@github.com:mugifly/angular-nest-on-docker.git
$ cd angular-nest-on-docker/
$ npm install
$ sudo docker-compose up -d
$ sudo docker-compose up --build app
After that, open the web browser and navigate to http://localhost:4200/
.
Also, when you edit the frontend source-code, HMR applies it to your browser immediately.
Requirements: Google Chrome and dependencies of Puppeteer
$ npm run test:client
$ sudo docker-compose up -d
$ sudo docker-compose exec app npm run test:client
$ npm run test:server -- -- -- --watchAll
$ sudo docker-compose up -d
$ sudo docker-compose exec app npm run test:server -- -- -- --watchAll
(NOTE: --
passes the following arguments to npm
of root -> lerna
-> npm
of server)
#TODO
This project is released under the CC0 1.0 Universal license, by Masanori Ohgita (mugifly).
Therefore, a copyright notice is NOT required. Feel free to use or copy it to your project :)
NOTE: However, some sample codes and documents (e.g. packages/**/README.md) that generated by Angular CLI or Nest CLI may be based on their respective licenses.