But how about if you could write Nodejs + Express server code in Angular terminologies like Module, Component, Service, Pipe etc? Does it sounds interesting to you? Well then you will find Nestjs very interesting.
NestJS - A progressive Node.js web framework
Nestjs is a web framework built upon Nodejs and Expressjs but in Angular way.
Here is the main.ts for bootstrapping server code. Note, I have enabled CORS settings by calling
Here is the default controller with GET REST endpoint. It calls local service to fetch message.
Here is the AppService which should talk with underlying database like MongoDB/MySql/Mock service.
Got confused if you are looking at Angular code or Nodejs, well that’s the beauty of Nestjs.
Here is the GitHub repository containing both Angular and Nestjs full stack seed project.
Building full stack application with Angular and Nestjs - ultrasonicsoft/angular-nestjs-seed