Accessing node server using docker container

I am trying to configure my server as instructed on this page (without much knowledge of JS and a few other components involved)

https://aws-amplify.github.io/docs/js/start

I am using docker and not able to connect to the container port 8080. As per quick search, I need to add this line.

app.listen(PORT, "0.0.0.0");

The question is exactly where or in which file should I add that line?


Here is the list of commands used:

docker run -v /tmp/:/tmp/ -p 8081:8080 -it node bash
npm install -g @aws-amplify/cli

 mkdir -p amplify-js-app/src && cd amplify-js-app
 touch package.json index.html webpack.config.js src/app.js

# Copy code from page https://aws-amplify.github.io/docs/js/start
cp /tmp/package.json .
cp /tmp/index.html .
cp /tmp/webpack.config.js .

npm install
npm start

An output of npm start command.

https://gist.github.com/shantanuo/605c108e0baff76dd54df265f7203df8

Source: StackOverflow