Giter Club home page Giter Club logo

hostconfig

Welcome to hostconfig.

'hostconfig' is a template project aiming to demonstrate how to launch multiple services concurrently, whether via your 'localhost' address or on a remote machine, within the infrastructure of a single web application.

quickstart

$ docker compose up --build

building 0...100%

http server listening on http://localhost:8080
https server listening on https://localhost:443

$ docker compose down

About hostconfig

This master project contains the following sub-projects:

  • hostconfig/app
  • hostconfig/http
  • hostconfig/https
  • hostconfig/public
  • hostconfig/static

Each sub-project exports a NodeJs module, written in Typescript and compiled to Javascript.

Each of these modules provides either a service (i.e., an http server) or some content that the service(s) can provide (i.e., static HTML pages or an express app).

This master project consumes each of these module sub-projects as NPM/Yarn workspaces, managed as git submodules.

Thus it is possible, from this master project, to spin up each of the available services concurrently, allowing for the various content to be served, accessed, and managed over a variety of different connection protocols, ports, and methods, all running as a single web application.

For example:

$ docker compose up --build

building 0...100%

http server listening on http://localhost:8080
https server listening on https://localhost:443
http2 server listening on https://localhost:8443

$ docker compose down

More services and content can be easily added to the 'src' directory, such as a database server and api routes (coming soon).

The content and functionality of 'hostconfig' - and it's sub-projects - is kept minimal, intended as a reference or a starting point for building larger, full-featured web applications from.

The primary technical goal is to implement a highly modular application infrastructure, which allows for services and content to be easily added, removed, launched and managed from a singular interface, in an almost "plug'n'play" fashion.

Additionally, each of the 'service provider' sub-projects are designed to function independently of the master project, where possible.

Further information

NOTE: the 'https' and 'http2' module require an additional build step to generate the required self-signed TLS certificates, which must also be installed in your browser and/or client - full instructions are available in the project repository.

Attempting to run Docker before generating these certificates per the instructions will likely cause the Docker build to fail, because the builder attempts to copy the certificates from your local disk (where you can use them further) instead of generating them inside of the Docker environment. A shell script named 'generate.sh' is provided which will create the required certificates in a new .certs/ directory. As long as this is placed at the root of the 'https' sub-module, the Docker build should succeed. Please be vigilante about the useage of self-signed certificates; these are generally only to be used for local development purposes and should not be shared publically.

Thanks for reading!

Nathan J. Hood

hostconfig's Projects

app icon app

Welcome to hostconfig/app.

http icon http

Welcome to hostconfig/http.

http2 icon http2

Welcome to hostconfig/http2.

https icon https

Welcome to hostconfig/https.

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.