Bundling Your Node.js Express App with esbuild

When setting up a backend node project, I have almost always defaulted to setting up a TypeScript to build the app using the outDir property in tsconfig.json.

// tsconfig.json
{
"compilerOptions": {
...
"outDir": "./built",
...
}
}

This worked well for local development as the node_modules folder sits right there and running the built file is a simple node built/index.js.

This did not work so well when it came time to deploy the backend code to a server. In order to successfully run…

--

--

Building https://kaizen.place. writing about C, C++, rust, game development, web development, engineering management. https://devtails.xyz/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Berg

Building https://kaizen.place. writing about C, C++, rust, game development, web development, engineering management. https://devtails.xyz/