Skip to content

Latest commit

 

History

History
84 lines (64 loc) · 3.31 KB

File metadata and controls

84 lines (64 loc) · 3.31 KB
Table of Contents
  1. ➤ About
  2. ➤ Technologies
  3. ➤ Prerequisites
  4. ➤ Scripts
  5. ➤ Folder Structure

-----------------------------------------------------

About

The scope of this repository is to act as support for this Medium Story and to demonstrate a simple way of how to orchestrate docker containers and validate your application in simple steps using Node, a basic Express server, Axios to trigger requests and Jest to execute your tests.

-----------------------------------------------------

Technology Stack

node.js npm express axios jest docker

-----------------------------------------------------

Prerequisites

  • Node (latest stable v16.17.0)
  • npm
  • Docker

-----------------------------------------------------

Scripts

$ npm install # will install all the dependencies on your machine
$ npm run start # will start the express server on your localhost
$ npm run test:local # will execute the tests against the server started on your localhost
$ npm run test:remote # will start two containers (one will boot the app - the other will execute the tests)

-----------------------------------------------------

Folder Structure

.
├── LICENSE
├── Makefile
├── README.md
├── application
│   └── app.js
├── docker
│   ├── application.Dockerfile
│   ├── docker-compose.yml
│   └── test-executor.Dockerfile
├── package-lock.json
├── package.json
└── tests
    ├── application-service.js
    ├── environment
    ├── environment.js
    ├── global-setup.config.js
    ├── jest.config.js
    ├── request.js
    └── test.spec.js