What is the fastest way to get up and running with TypeScript and Node?
Hello!
I need to write a stateful socket.io server that I am going to deploy to railway. I want to use typescript, however it seems that if you are not using a front end framework there is no great way to get up and running quickly with typescript.
Anyone have any recommendations? Thanks!
5 Replies
Check out to-node
Ts-node
One of my projects uses a long running server for websockets and you can get it up and running in just a few minutes
Is TS-node only for dev or can it be used for prod as well?
I don’t see why not. It’s just node + a ts compiler
https://create.t3.gg/en/usage/prisma#seeding-your-database
TSX is recommended in the create-t3-app docs
https://github.com/esbuild-kit/tsx
GitHub
GitHub - esbuild-kit/tsx: ⚡️ TypeScript Execute (tsx): Node.js enha...
⚡️ TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM - GitHub - esbuild-kit/tsx: ⚡️ TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript &...
just a heads up TSX really awesome getting dev + testing ran really quickly, but it doesn't check type checking. the TSX docs also mention that. so when you're about to build and deploy, run
tsc