Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Von vorne bis hinten: Angular ♥︎ NestJS @ WebWorker Saar 44

Von vorne bis hinten: Angular ♥︎ NestJS @ WebWorker Saar 44

Du magst Angular, TypeScript und baust im Handumdrehen clientseitige Apps? Irgendwann benötigst du wahrscheinlich eine serverseitige API. Es wäre nur natürlich, im Backend die gleiche Sprache zu nutzen, wie Du sie im Frontend verwendest. Du entscheidest dich für Node.js. Doch wenn wir reines Node oder Bibliotheken wie Express nutzen, betreten wir Frontend-Entwickler oft unbekanntes Terrain. Uns fehlen Idiome und strukturelle Muster.

Hast du schon von NestJS gehört? Dieses Framework ermöglichst es uns, effiziente, zuverlässige und skalierbare serverseitige Anwendungen zu erstellen. Bemerkenswert daran ist, dass es sich ähnlicher Konzepte bedient wie Angular. Du kannst deinen Code in Modulen organisieren, per Dependency Injection speist du deine Services in Controller (die sozusagen deine Komponenten für API-Routen sind), und es gibt sogar eine CLI, damit du schnell loslegen kannst.

Wir schauen uns an, wie eine Projektstruktur mit Angular-Front- und NestJS-Backend aussehen kann, schreiben unsere ersten API-Routen und schließen das Ganze mit Unit Tests ab. Weil es so einfach ist, erstellen wir nebenbei eine nette API-Dokumentation und werfen einen Blick auf hilfreiche, bereits integrierte Plugins. Am Ende solltest du gerüstet sein, eine Full-Stack-Webanwendung durch die Symbiose von Angular und NestJS umzusetzen.

David Würfel

April 09, 2020
Tweet

More Decks by David Würfel

Other Decks in Programming

Transcript

  1. „Hey! My name is Andre Gular. I am looking for

    a companion. Someone who is similar to me and for whom my hobbies are fine.“
  2. „I said hello to Eliza Xopress. We met a couple

    of times, but I think I can‘t handle her. She is kinda messy and has little structure in her life.“
  3. „I‘ve met with Andre Gular. I've done my best to

    make us understand each other. However he couldn't handle my loose lifestyle.“
  4. „I think I need to start over. I will update

    my profile details again. I need to find a good match.“
  5. „I‘ve met with Andre Gular. He is a really nice

    guy. Our interests coincide to a large extent.“
  6. „Meeting Nesta Jason was a real breeze. We have so

    much in common. However we still have some things to clear up.“
  7. „We‘re talking on the same wavelength. Seems to good to

    be true. I am still unsure whether Nesta is herself and doesn‘t pretend to be someone else.“
  8. „Nesta is awesome and a true match! I am so

    happy, I would even go so far to secure our friendship through some kind of contract.“
  9. „I am sure that we can deal well with our

    mistakes and that our friendship will last for a long time.“
  10. „I want to thank Nesta for being such a good

    friend with something special.“
  11. „Andre, that wouldn't have been necessary. You are so attentive,

    making my wishes come through. Thank you so much!“