{"id":2253,"date":"2022-08-19T11:48:31","date_gmt":"2022-08-19T09:48:31","guid":{"rendered":"https:\/\/www.thecodecampus.de\/blog\/?p=2253"},"modified":"2025-04-24T12:15:30","modified_gmt":"2025-04-24T10:15:30","slug":"angular-nestjs-starter-project","status":"publish","type":"post","link":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/","title":{"rendered":"Angular \/ NestJS Starter Project"},"content":{"rendered":"<h3>Getting startet<\/h3>\r\n<!-- \/wp:post-content -->\r\n\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code>npm i -g @nestjs\/cli<\/code><\/pre>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code>nest new angular-de-nestjs-tutorial\r\ncd angular-de-nestjs-tutorial\r\nnpm run start<\/code><\/pre>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>Training Server Project<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>To show you how to use Nest as the backend of your Angular Application ( or any Other Client Application using a HTTP Client), we have a look into a basic server we use in our trainings. The server supplies the client application with the trainings, that are scheduled in the future. Each training contains a logo-URL of the technology teached in the course. This logo-image is served by the Nest-Serve as well.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>To meet these requirements, the server has to have two controllers, that handle the request for the trainings and the requests for the logos.<\/p>\r\n<!-- \/wp:paragraph -->\r\n<p><a style=\"display: inline-block;\" href=\"https:\/\/www.thecodecampus.de\/schulungen\/angular\"> <picture> <source srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2025\/04\/angular-schulungen_anne_WP_big.png\" media=\"(min-width: 1024px)\" \/> <source srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2025\/04\/angular-schulungen_anne_WP_medium.png\" media=\"(min-width: 600px)\" \/> <img decoding=\"async\" class=\"alignnone size-full wp-image-38\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2025\/04\/angular-schulungen_anne_WP_small.png\" alt=\"Angular Schulungen\" \/> <\/picture> <\/a><\/p>\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>Project Scaffolding<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Let&#8217;s have a look at the overall project structure of a NestJS application. The main selling point of the framework is its architectural design, which is very close to Angular&#8217;s structure. Word on the street is, that the developer of NestJS really liked the architectural concept of Angular and applied it to their Backend Framework. This explains the obvious similarities in structure, handling and naming.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>This doesn&#8217;t mean that NestJS is made exclusively for Angular Frontends thought. Its a standalone Framework supplying the developer with a clear architecture model and can be combined with every frontend framework of your choice. The communication happens over a REST interface.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:image {\"id\":2261} -->\r\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" class=\"wp-image-2261\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/services_overview-1024x576.jpg\" alt=\"\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/services_overview-1024x576.jpg 1024w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/services_overview-300x169.jpg 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/services_overview-768x432.jpg 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/services_overview.jpg 1058w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/>\r\n<figcaption>Overview of our example NestJS Application<\/figcaption>\r\n<\/figure>\r\n<!-- \/wp:image -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>In the illustration above we can see the fundamental architectural elements, that make up our example application for the Training App.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>One of the main concerns of NestJS are modularization. therefore on the highest level functionality is bundled into modules. Therefore the code, that handles the training data, is encapsulated in the TrainingModule of our example.<\/p>\r\n<pre class=\"wp-block-code\"><code>of our example.<\/code><\/pre>\r\n<p>Bundled in the module we find the next layer of encapsulation in the shape of controllers and services. These building blocks handle the requests of the frontend (controllers) and retrieving data from the database (services). Let&#8217;s have a closer look how they are structured and how they look in our example use case.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>Controllers<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:image {\"id\":2260,\"align\":\"center\",\"width\":519,\"height\":291} -->\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2260\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/controllers_overview-1024x576.jpg\" alt=\"\" width=\"519\" height=\"291\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/controllers_overview-1024x576.jpg 1024w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/controllers_overview-300x169.jpg 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/controllers_overview-768x432.jpg 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/controllers_overview.jpg 1058w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/figure>\r\n<\/div>\r\n<!-- \/wp:image -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>As you can see in the illustrated model above, there is a controller for each route, that can be accessed. In our example case two controllers are of interest: the trainings controller with the route<em> \/trainings<\/em> and the images controller with the route <em>\/images<\/em>. in the following code-snippet we have a look into the trainings-controller class.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code>@Controller('trainings')\r\n@ApiTags('trainings')\r\nexport class TrainingsController {\r\n    constructor(private readonly trainingsService: TrainingsService) {\r\n    }\r\n\r\n    @Get()\r\n    @ApiResponse({ status: 200, description: 'All Trainings.'})\r\n    findAll(@Response() res): string {\r\n        const trainings = this.trainingsService.findAll();\r\n        return res.status(HttpStatus.OK).json(classToPlain(trainings));\r\n    }\r\n\r\n    @Get(':id')\r\n    @ApiResponse({ status: 200, description: 'Training with given id.'})\r\n    @ApiResponse({ status: 404, description: 'Training with given id does not exist.'})\r\n    findOne(@Param() params, @Response() res): string {\r\n        const id = parseInt(params.id, 10);\r\n        if (isNaN(id)) {\r\n            return res.status(HttpStatus.BAD_REQUEST).json();\r\n        }\r\n\r\n        const training = this.trainingsService.findOne(id);\r\n        if (training) {\r\n            return res.status(HttpStatus.OK).json(classToPlain(training));\r\n        } else {\r\n            const error = new CustomError(HttpStatus.NOT_FOUND, 'Not found', `Id ${id} not found.`);\r\n            return res.status(HttpStatus.NOT_FOUND).json(classToPlain(error));\r\n        }\r\n    }\r\n                   .            .           .\r\n                   .            .           .\r\n                   .            .           .<\/code><\/pre>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>If you are familiar with the Angular architecture, you are used to the decorators, that define classes as components, module or services. The same structure is used in NestJS. In the case above you its the decorator <code>@Controller('trainings')<\/code> handles this.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The controller now handles the different requests that are made with the specified route in the class-decorator. Above we see the findAll. The function is marked with the decorator <code>@Get()<\/code> and therefore handles all requests without parameters. As the name of the function implies, the response returns all trainings. They are retrieved from the database with the help of the trainings service, which is injected in the controllers constructor.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The first function handles requests without parameters. If you want to choose a specific training though, you have to filter according to a specified ID. Therefore we include another function, that handles requests, that contain the id of the requested training as parameters. In our example this is the function <code>findOne(@Param() params, @Response() res)<\/code>. According to the first function the method is decorated. This time the decorator is including a parameter though. With <code>@Get(':id')<\/code>. To use the parameters in the function the params are passed into the function as <code>@Param() params<\/code> next to the response <code>@Response() res<\/code>. Inside the function the prameters can be handled and stored accordingly <code>const id = parseInt(params.id, 10);<\/code>.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>Services<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The data manipulation is handled through a service, that is invoked by the controller. In this example we have a deeper look into the Trainings-Service. In the example below we work with a simple mock repository <code>TRAININGS<\/code>. The mock data is loaded into the variable training in the constructor. From there, we use them in various methods that return and manipulate the data according to the controller&#8217;s method call.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph \/-->\r\n\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code>@Injectable({ scope: Scope.DEFAULT })\r\nexport class TrainingsService {\r\n    trainings: TrainingsEntity[] = [];\r\n    constructor() {\r\n        this.trainings = TRAININGS;\r\n    }\r\n\r\n    reset(): void {\r\n        this.trainings = TRAININGS;\r\n    }\r\n    \r\n    findAll(): TrainingsEntity[] {\r\n        return this.trainings;\r\n    }\r\n\r\n    findOne(id: number): TrainingsEntity {\r\n        return this.trainings.find(t =&gt; t.id === id);\r\n    }\r\n\r\n    update(id: number, values: TrainingsEntity): boolean {\r\n        this.trainings = this.trainings.map(t =&gt; {\r\n            return (t.id === id) ? {...t, ...values} : t;\r\n        });\r\n        return true;\r\n    }\r\n\r\n    create(training: TrainingsEntity): TrainingsEntity {\r\n        training.id = this.getNextId();\r\n        this.trainings.push(training);\r\n        return training;\r\n    }\r\n\r\n    remove(id: number): boolean {\r\n        this.trainings = this.trainings.filter(t =&gt; t.id !== id);\r\n        return true;\r\n    }\r\n    private getNextId(): number {\r\n        let newId = 0;\r\n        this.trainings.forEach((currentTraining) =&gt; {\r\n            if (currentTraining.id &gt; newId) {\r\n                newId = currentTraining.id;\r\n            }\r\n        });\r\n        return newId + 1;\r\n    }\r\n}<\/code><\/pre>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>Serving static files<\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>So now we can serve the frontend according to the specified request. There is a special module in NestJS which allows us to create static contents, e.g. SPA&#8217;s. The module can be easy installed with:<\/p>\r\n<pre class=\"language-bash\"><code class=\" language-bash\">npm install --save @nestjs\/serve-static<\/code><\/pre>\r\n<p>After the installation we have to import the ServerStaticModule into our AppModule. Thats can be done by adding the content to the rootPath in the forRoot()-method as you can see below.<\/p>\r\n<p>We want to use this module to serve our static logo-images. To implement this, lets have a look at our images-controller. The controller contains the same functions as above. We send a GET request to the database with an image-id. If the image exists, we can load the image from the image path, otherwise we throw an exception.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code>@Controller('assets\/images\/trainings')\r\nexport class ImagesController {\r\n\r\n    constructor() {\r\n    }\r\n\r\n    @Get(':image')\r\n    @ApiResponse({ status: 200, description: 'Training with given id.'})\r\n    @ApiResponse({ status: 404, description: 'Training with given id does not exist.'})\r\n    findOne(@Param() params, @Response() res): string {\r\n        const imageName = params.image;\r\n        if (imageName===\"\") {\r\n            return res.status(HttpStatus.BAD_REQUEST).json();\r\n        }\r\n\r\n        try{\r\n            return res.status(HttpStatus.OK).sendFile(`\/images\/trainings\/${imageName}`, { root: 'assets' });\r\n        } catch (e) {\r\n            const error = new CustomError(HttpStatus.NOT_FOUND, 'Not found', `Image ${imageName} not found.`);\r\n            return res.status(HttpStatus.NOT_FOUND).json(classToPlain(error));\r\n        }\r\n    }\r\n\r\n}<\/code><\/pre>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code>@Module({\r\n    imports: [SettingsModule,\r\n        UserModule,\r\n        TypeOrmModule.forRoot(TypeOrmConfig),\r\n        AuthModule,\r\n        TrainingsModule,\r\n        ImagesModule,\r\n        ServeStaticModule.forRoot(\r\n            {rootPath: join(__dirname, '..', 'assets')},\r\n        )],\r\n    controllers: [AppController],\r\n    providers: [AppService],\r\n})\r\nexport class AppModule {\r\n}<\/code><\/pre>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3>Conclusion<\/h3>\r\n<p>As you can see NestJS and its architecture is quite similar to the angular framework. Its an open source project licenced by MIT and a really good choice if you want to make a modern website with an easy backend. If you worked with angular in the past you will get in easily and fast, else, you also get in very easy. If your choice in web development is NestJS, you will see that the framework comes with many features and options out of the box.<\/p>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph \/-->\r\n\r\n<!-- wp:heading {\"level\":3} \/-->","protected":false},"excerpt":{"rendered":"<p>Getting startet <code>npm i -g @nestjs\/cli<\/code> <code>nest new angular-de-nestjs-tutorial cd angular-de-nestjs-tutorial npm run start<\/code> Training Server Project To show you how to use Nest as the backend of your Angular Application ( or any Other Client Application using a HTTP Client), we have a look into a basic server we use in our trainings. The [&#8230;]<br \/><a class=\"meta-big\" href=\"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/\"> READ MORE<\/a><\/p>\n","protected":false},"author":23,"featured_media":2258,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[147,133,146,60],"tags":[],"class_list":["post-2253","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backend","category-nestjs","category-server","category-typescript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Angular \/ NestJS Starter Project - Web Development Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Angular \/ NestJS Starter Project - Web Development Blog\" \/>\n<meta property=\"og:description\" content=\"Getting startet npm i -g @nestjs\/cli nest new angular-de-nestjs-tutorial cd angular-de-nestjs-tutorial npm run start Training Server Project To show you how to use Nest as the backend of your Angular Application ( or any Other Client Application using a HTTP Client), we have a look into a basic server we use in our trainings. The [...] READ MORE\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Development tips and tricks - theCodeCampus Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-19T09:48:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-24T10:15:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/NESTJS-tcc.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1058\" \/>\n\t<meta property=\"og:image:height\" content=\"595\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Janik Kessler\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Janik Kessler\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/\"},\"author\":{\"name\":\"Janik Kessler\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/0dda62aeb98f2e9a89c2438b6f990101\"},\"headline\":\"Angular \\\/ NestJS Starter Project\",\"datePublished\":\"2022-08-19T09:48:31+00:00\",\"dateModified\":\"2025-04-24T10:15:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/\"},\"wordCount\":883,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/NESTJS-tcc.jpg\",\"articleSection\":[\"Backend\",\"NestJs\",\"Server\",\"TypeScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/\",\"name\":\"Angular \\\/ NestJS Starter Project - Web Development Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/NESTJS-tcc.jpg\",\"datePublished\":\"2022-08-19T09:48:31+00:00\",\"dateModified\":\"2025-04-24T10:15:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/NESTJS-tcc.jpg\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/NESTJS-tcc.jpg\",\"width\":1058,\"height\":595},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/angular-nestjs-starter-project\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Angular \\\/ NestJS Starter Project\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"name\":\"Web Development tips and tricks - theCodeCampus Blog\",\"description\":\"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\",\"name\":\"theCodeCampus\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"width\":156,\"height\":156,\"caption\":\"theCodeCampus\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/0dda62aeb98f2e9a89c2438b6f990101\",\"name\":\"Janik Kessler\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/janik-kessler-tcc-author-96x96.png\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/janik-kessler-tcc-author-96x96.png\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/janik-kessler-tcc-author-96x96.png\",\"caption\":\"Janik Kessler\"},\"description\":\"Hi, I'm Janik. I'm a web development enthusiast and love to share my experiences. As a software trainer and engineer, I always seek to exchange ideas with other developers. I've been part of the theCodeCampus team since 2019 and have had the opportunity to meet many exciting engineers, learning a great deal from their experiences.\",\"sameAs\":[\"https:\\\/\\\/thecodecampus.de\\\/ueber-uns\\\/trainer\\\/janik-kessler\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/janik-kessler-615034233\\\/\"],\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/author\\\/jhorst\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Angular \/ NestJS Starter Project - Web Development Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/","og_locale":"en_US","og_type":"article","og_title":"Angular \/ NestJS Starter Project - Web Development Blog","og_description":"Getting startet npm i -g @nestjs\/cli nest new angular-de-nestjs-tutorial cd angular-de-nestjs-tutorial npm run start Training Server Project To show you how to use Nest as the backend of your Angular Application ( or any Other Client Application using a HTTP Client), we have a look into a basic server we use in our trainings. The [...] READ MORE","og_url":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/","og_site_name":"Web Development tips and tricks - theCodeCampus Blog","article_published_time":"2022-08-19T09:48:31+00:00","article_modified_time":"2025-04-24T10:15:30+00:00","og_image":[{"width":1058,"height":595,"url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/NESTJS-tcc.jpg","type":"image\/jpeg"}],"author":"Janik Kessler","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Janik Kessler","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/#article","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/"},"author":{"name":"Janik Kessler","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/0dda62aeb98f2e9a89c2438b6f990101"},"headline":"Angular \/ NestJS Starter Project","datePublished":"2022-08-19T09:48:31+00:00","dateModified":"2025-04-24T10:15:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/"},"wordCount":883,"commentCount":0,"publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/#primaryimage"},"thumbnailUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/NESTJS-tcc.jpg","articleSection":["Backend","NestJs","Server","TypeScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/","url":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/","name":"Angular \/ NestJS Starter Project - Web Development Blog","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/#primaryimage"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/#primaryimage"},"thumbnailUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/NESTJS-tcc.jpg","datePublished":"2022-08-19T09:48:31+00:00","dateModified":"2025-04-24T10:15:30+00:00","breadcrumb":{"@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/#primaryimage","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/NESTJS-tcc.jpg","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2020\/01\/NESTJS-tcc.jpg","width":1058,"height":595},{"@type":"BreadcrumbList","@id":"https:\/\/www.thecodecampus.de\/blog\/angular-nestjs-starter-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.thecodecampus.de\/blog\/"},{"@type":"ListItem","position":2,"name":"Angular \/ NestJS Starter Project"}]},{"@type":"WebSite","@id":"https:\/\/www.thecodecampus.de\/blog\/#website","url":"https:\/\/www.thecodecampus.de\/blog\/","name":"Web Development tips and tricks - theCodeCampus Blog","description":"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.","publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.thecodecampus.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.thecodecampus.de\/blog\/#organization","name":"theCodeCampus","url":"https:\/\/www.thecodecampus.de\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","width":156,"height":156,"caption":"theCodeCampus"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/0dda62aeb98f2e9a89c2438b6f990101","name":"Janik Kessler","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/09\/janik-kessler-tcc-author-96x96.png","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/09\/janik-kessler-tcc-author-96x96.png","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/09\/janik-kessler-tcc-author-96x96.png","caption":"Janik Kessler"},"description":"Hi, I'm Janik. I'm a web development enthusiast and love to share my experiences. As a software trainer and engineer, I always seek to exchange ideas with other developers. I've been part of the theCodeCampus team since 2019 and have had the opportunity to meet many exciting engineers, learning a great deal from their experiences.","sameAs":["https:\/\/thecodecampus.de\/ueber-uns\/trainer\/janik-kessler","https:\/\/www.linkedin.com\/in\/janik-kessler-615034233\/"],"url":"https:\/\/www.thecodecampus.de\/blog\/author\/jhorst\/"}]}},"_links":{"self":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/2253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/comments?post=2253"}],"version-history":[{"count":39,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/2253\/revisions"}],"predecessor-version":[{"id":3477,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/2253\/revisions\/3477"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/media\/2258"}],"wp:attachment":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/media?parent=2253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/categories?post=2253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/tags?post=2253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}