Skip to content

Boilerplate code with Angular Universal (server side rendering) & Node server written in TypeScript with express API routes to get started with your project in Angular 8.2 + Node.ts

License

Notifications You must be signed in to change notification settings

meetdave3/angular-node-typescript-boiler

Repository files navigation

Angular 6 + Node.js - Boiler

Build Status

This project is a starter project with Node at the backend (fully written in TypeScript) and Angular 6 on the client side.

This repo shall allow you to instantly get started with a full stack project in place. Just connect it with your favorite database and you're good to go.

Repo Features

  • Angular 6.1.6
  • Bootstrap
  • Lazy Loaded Routes
  • Angular Material
  • PWA Ready
  • Server Side TypeScript
  • Node.js API
  • Production Ready Build
  • Server Side Rendering (Angular Universal)

Setup

After cloning, run npm install

Development server

Run ng serve

Navigate to http://localhost:4200/.

Code scaffolding

Run ng g c component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Production Build

Run npm run build:prerender && npm run serve:ssr to build the project

Compiles the boiler application and spins up a Node Express to serve the Boiler Universal application on http://localhost:3015

npm run build:prerender && npm run serve:prerender - Compiles your application and prerenders your application's files, spinning up a demo http-server so you can view it on http://localhost:8080 Note: To deploy your static site to a static hosting platform you will have to deploy the dist/browser folder, rather than the usual dist

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Contribution

Pull Requests are always welcome.