Skip to content

A template repo for a simple NodeJS app with tests for demos

License

Notifications You must be signed in to change notification settings

pmanlukas/simple-nodejs-app-template

 
 

Repository files navigation

Welcome!

This repository contains a basic NodeJS server useful for demonstration purposes. The served webpage will connect to GitHub's Octocat API endpoint and return the Zen quote of the day.

Relevant packages used in this setup:

  • pug (templates)
  • fetch
  • mocha / nyc / codecov (unit tests with coverage report)

Demo (sucess)

out

Demo (failure)

out

There are some built-in unit tests to ensure that everything can be verified.

Instructions

Please fork this repository and ensure you have a local working copy. You will need a working NodeJS environment. Get the latest stable version from https://nodejs.org/en/download/ or via your OS package manager (e.g. brew on Mac or chocolatey on Windows).

CI:

npm install 
npm run test
npm run lint [optional]
npm run report-coverage

Run server (defaults to localhost:3000):

npm start

About

A template repo for a simple NodeJS app with tests for demos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 79.5%
  • HTML 11.1%
  • Dockerfile 9.4%