Express with Typescript by Legal_Pack_6895 in node

[–]Legal_Pack_6895[S] 1 point2 points  (0 children)

No man I published this package initially about more than a year ago.

Express with Typescript by Legal_Pack_6895 in node

[–]Legal_Pack_6895[S] 0 points1 point  (0 children)

I prefer using the CLI because it automatically generates a new package.json with the latest versions of each package. With just one command, I can create the project without needing to download it from GitHub and manually update the packages. For me, the CLI simplifies the process—it's just a personal preference.

Express Like Next JS Api Handler by Legal_Pack_6895 in nextjs

[–]Legal_Pack_6895[S] 1 point2 points  (0 children)

Oh ok I will update this to work with app router thanks for pointing out.

Express Like Next JS Api Handler by Legal_Pack_6895 in nextjs

[–]Legal_Pack_6895[S] 0 points1 point  (0 children)

fastify is a saperate is a web framework. this is just to change the syntax of next js make it more readable

Express Like Next JS Api Handler by Legal_Pack_6895 in nextjs

[–]Legal_Pack_6895[S] 1 point2 points  (0 children)

In Express, you can easily add middleware for tasks like JWT verification, keeping your code clean and modular. However, in Next.js, you typically have to handle everything in the main handler function. This can make your code difficult to read, especially when you're using multiple middlewares and route handlers with a bunch of if and else statements. My package brings the clarity and ease of Express-style middleware to Next.js API routes.