We recommend using our
@commercetools-frontend/mc-http-server package to run the application in
@commercetools-frontend/mc-http-server has built-in functionality that is necessary for the application to work. Most importantly:
- Compiling the
index.htmlto inject the runtime configuration specified in the application config.
- Preparing the HTTP response headers, including the custom headers provided in the application config.
The package comes with a binary
mc-http-server that sets up all the necessary configurations and starts a small Node.js server.
A pre-built Docker image (
eu.gcr.io/ct-images/mc-http-server) is also available for running the application in a Docker environment:
docker pull eu.gcr.io/ct-images/mc-http-serverdocker run \-v $(pwd):/etc/app \-p 8080:8080 \eu.gcr.io/ct-images/mc-http-server
The version of the Docker image is the same as the last release of the