Ask HN: How do you set up a new TypeScript project for Node.js?

4 points by lovingCranberry ↗ HN
I always find me setting up typescript by hand when creating a new project.

This includes writing a nodemon-startup script in ``package.json``, setting an export for ``dist/index.js``, setting the type to module, tweaking ``tsconfig.json`` to support ES2020 or newer etc.

Is there any sane boiler plate which you use? For next.js, CRA and other web framework stuff countless typescript boilerplates exist, but I have yet to find anything which works for "normal" node.js projects.

2 comments

[ 3.3 ms ] story [ 17.0 ms ] thread
I just copy and paste from old projects like a clown.

Maybe this would be a good portfolio project thing for me to build.

Same here. I have a scaffold I use, with a tsconfig and some other common boilerplate.

Personally I avoid using big frameworks like nest, etc. and just use my simple boiler plate and add functionality I'll need.

Most of the boilerplate I've seen on github are (imo) awfully bloated.