Skip to content

daticahealth/dcc-node-express-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DCC NodeJS Example

This application is a simple NodeJS API (using Express framework) that will return a message from a GET to the root path.

Requirements

  • Port: The application is coded to run on port 8081.
  • Environment Vars:
    • MESSAGE: The message that the API will return on a GET to "/". This variable is required.
  • Health Check: The application has a dedicated health check endpoint at /_healthcheck that should return a 200 status.

How to Run

  • The app is started with the following command: node app.js.

DCC Deployment

  • This repository contains both a Dockerfile and a Procfile; the deployment can be done with either mechanism.

  • Setup the repository connection

  • Configure the build - this demonstrates a BuildPack build, to create with a Dockerfile, set the BuildType to "Dockerfile" and set the Dockerfile Name to the match the Dockerfile in the root of this repo ("Dockerfile"). Note the 'procfile entry' field matches the key of the field from the repository Procfile that contains the application startup command.

  • Set the port to the port this application will run on, 8081. Modify the scale/ram/cpu to meet your needs.

  • Set the health check endpoint to use the designated route the application provides; the expected response is a 200.

  • Set the listener path to listen on the root

  • Configure the required add-ons, we need the MESSAGE environment variable

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published