2022-03-04
2764
#typescript
Rose Chege
96076
Mar 4, 2022 â‹… 9 min read

How to build a REST API with TypeScript using only native modules

Rose Chege Rose is a lover of technology and an upright individual who is not afraid to get out of her comfort zone and try out new programming paradigms.

Recent posts:

how to design apps with Apple Intelligence in mind

How to design apps with Apple Intelligence in mind

Apple Intelligence is here. What does it mean for frontend dev and UX? Explore the core features of the update, do’s and don’ts for designing with Apple Intelligence in mind, and reflect on the future of AI design.

Murat YĂĽksel
Jun 24, 2025 â‹… 10 min read
How To Optimize Your Next.js App With After()

How to optimize your Next.js app with after()

Next.js’ after() is a new API that lets you run logic after your route has finished rendering, without blocking the client.

Temitope Oyedele
Jun 24, 2025 â‹… 11 min read
JavaScript Loops Explained, And Best Practices

JavaScript loops explained, and best practices

JavaScript loops like for, for...of, and for...in are constructs that help run a piece of code multiple times.

Rahul Padalkar
Jun 23, 2025 â‹… 8 min read
8 Reasons Your Next.js App Is Slow — And How To Fix Them

8 reasons your Next.js app is slow — and how to fix them

You don’t need to guess what’s wrong with your Next.js app. I’ve mapped out the 8 biggest performance traps and the fixes that actually work.

Chizaram Ken
Jun 20, 2025 â‹… 16 min read
View all posts

One Reply to "How to build a REST API with TypeScript using only native modules"

  1. It should be noted that your first code snipped for importing HTTP doesn’t work as written. The library is specifically “http” (must be lowercase) and because you’re using “http” as the reference to the library the import should actually be:

    import http from “http”;

    in order for your code to work properly. Other than that, great post!

Leave a Reply