DEV Community 👩‍💻👨‍💻


Posted on

How to reload express.js server with esbuild

I'm trying to develop web server made of express.js. And I want to use esbuild as bundler, but esbuild don't have feature to realod server. So I tried to add the feature.

Finally, I used nodemon. Like below.

    "watch": [
    "ignore": [
    "ext": "ts,mjs,js,json,graphql",
    "exec": "yarn build && yarn start",
    "legacyWatch": true
Enter fullscreen mode Exit fullscreen mode

But it isn't best way to reload because that code regenerate all code... ... If you have another solution, I want to know that!!

Top comments (0)

🌚 Life is too short to browse without dark mode