Avatar ·

How to automatically restart ts-node when TypeScript files change (watch & reload)

Hello everyone! I'm a beginner TypeScript developer and I've run into a problem that's really slowing down my development. I'm writing a backend on Express with TypeScript. Every time I make changes to the code (for example, in the `server.ts` file), I need to manually stop the process (`Ctrl+C`) and run `ts-node server.ts` again. This is very inconvenient, especially when I need to quickly test changes. Here's an example of my project: ```typescript // server.ts import express from 'express'; const app = express(); const PORT = 3000; app.get('/', (req, res) => { res.send('Hello, World!'); }); app.listen(PORT, () => { console.log(`Server running on http://localhost:${PORT}`); }); ``` I've heard about tools like `nodemon` that automatically restart the server when changes