andykrohg / reference-nodejs-npm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ploigos Reference Application using npm & Node.js

Running the Application Locally

To run this example application on your local host:

$ npm install && npm start

Testing the Container Image Build Locally

$ 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

Interacting with the Example Application Locally

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!"}

Updating the Example Application

To update your example application:

  1. Stop your example application.

    Note
    To stop your running example application in a Linux or macOS terminal, use CTRL+C. In a Windows command prompt, you can use CTRL + Break(pause).
  2. Make your change (e.g. edit public/index.html).

  3. Restart your example application.

  4. Verify the change took effect.

About

License:Apache License 2.0


Languages

Language:JavaScript 72.5%Language:HTML 24.4%Language:CSS 1.8%Language:Dockerfile 1.3%