To make this app simpler to run in a cloud environment, we can containerize the app by using Docker and creating a simple Dockerfile that looks like:
FROM node:lts-alpine
# install simple http server for serving static content
RUN npm install -g http-server
# make the 'app' folder the current working directory
WORKDIR /app
# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./
# install project dependencies
RUN npm install
# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
# build app for production with minification
RUN npm run build
EXPOSE 8080
CMD [ "http-server", "dist" ]
Iβve tried this setup and this Dockerfile works, but an application error is thrown thatβs not thrown on the demo website:
ReferenceError: SharedArrayBuffer is not defined
at 17b35eff-b80d-4c99-8195-9e4c9e9d7242:22:175
at Object.be [as load] (index.396c12aa.js:42:4082)
at async wp.transcode (index.396c12aa.js:42:6842)
at async l (index.396c12aa.js:42:10753)