DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,503 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
T-Kisaku
T-Kisaku

Posted on

How to reload express.js server with esbuild

Hello!!
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": [
        "src"
    ],
    "ignore": [
        "dist",
        "node_modules"
    ],
    "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!!

Latest comments (0)

🌚 Life is too short to browse without dark mode