To run this example application on your local host:
$ npm install && npm start
$ npm install
$ buildah bud -t reference-nodejs-npm .
$ podman run -p 8080:8080 --rm --name=reference-nodejs-npm reference-nodejs-npm
$ podman stop reference-nodejs-npm # run this in another terminal to stop the app
To interact with your example application while it’s running locally, use the form at http://localhost:8080
or the curl
command:
$ curl http://localhost:8080/api/greeting
{"content":"Hello, World!"}
$ curl http://localhost:8080/api/greeting?name=Sarah
{"content":"Hello, Sarah!"}
To update your example application:
-
Stop your example application.
NoteTo stop your running example application in a Linux or macOS terminal, use CTRL+C
. In a Windows command prompt, you can useCTRL + Break(pause)
. -
Make your change (e.g. edit
public/index.html
). -
Restart your example application.
-
Verify the change took effect.