Giter Site home page Giter Site logo

docker-orchestration-node-express-jest's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.