Build a Subdomain Service using Nest.js and TypeScript.

October 24, 2022

This article is a follow up to a live stream that I recorded on Twitch. In this live stream we did the following:

• We built a subdomain service (We called it the Pokemon Service!) that can serve different web pages based on the subdomain from which it was accessed from.

• For example, pikachu.domain.com would serve a page related to Pikachu, similarly charmander.domain.com, etc. The app served requests coming in to *.domain.com dynamically based on the slug before the domain.com.

• Along the way, we also talked about clean code and what abstractions or patterns make sense here.

• For this tutorial, we used Nest.js and TypeScript.

• It was a Node.js application and we deployed it to the cloud using Digital Ocean.


Building the Subdomain Service.



Please subscribe to my YouTube channel as I plan to do more of such recordings.

https://tinyurl.com/465stypj

All the code for this project lives on this open source repository.

https://github.com/MustansirZia/pokemon-service

Clap for this article on Medium?

https://medium.com/@mustansirzia/build-a-subdomain-service-using-nest-js-and-typescript-4bdc6a4bf100


All References: