Example of running Express.js app without node_modules

For: https://twitter.com/papanberjalan/status/1777611772813300055

Steps:

  1. Bundle the JS app
yarn build
  1. Build the docker image
docker build -t no-modules-express .
  1. Start a container with the image
docker run -p 3000:3000 no-modules-express
  1. Verify localhost:3000 returns "Hello world!"

  2. Verify container does not include /usr/src/app/node_modules