This was begun from an Azure DevOps Project template for a Node JS app. The app itself will not be anything exciting.
There are two node projects (Applications and Tests), an ARM template, and helper scripts. Descriptions of each are below.
To start the app locally, you should be able to just change to the Application
directory and executing the following:
cd Application
npm install
npm run start:debug
If you find the debugging output to be too much, you can just run npm run start
. Once the app has started, you can reach it at http://localhost:3000
There are both Unit Tests and Functional Tests. The unit tests run against a localhost server on port 4000 and can be run to output to the console, or to create JUnit output as a file. Typically, for local development you would want to run the unit tests with console output and in a CI environment, you would want the JUnit output. Functional tests run against a running instance of the app. For local development you would most likely run against the app running at http://localhost:3000 while the functional tests that run as part of the deployment process run against the URL for the deployed environment. Note that you will need to run the Application npm install prior to running the unit tests as below.
cd Tests
npm install
npm run unittest
cd Tests
npm install
npm run unittest:report
cd Tests
npm install
npm run functionaltest
cd Tests
npm install
npm run functionaltest:report
The ARM template will be used to create an App Service in Azure.
The scripts
folder has scripts that can help with the CI/CD pipeline.