This is an example of a Node.js service using TypeScript and compiling to ES Modules. It uses SWC for compilation, nodemon for watching files and tsx for executing TypeScript files.
It includes Fastify to demonstrate the live-reloading functionality of an HTTP server and includes the chalk
npm package in order to verify that it is able to import packages published as both CommonJS and ES Modules.
Run npm install
and after that you should be able to run npm run build
or npm run start:dev
.