Git Product home page Git Product logo

color-app's Introduction

Color App ๐ŸŸฅ๐ŸŸจ๐ŸŸฉ๐ŸŸฆ

This app can be used in scenarios where you need multiple website instances that do nothing, but look different. This app displays a web page with a message in the center of the page. The colors (background and foreground) and the message are configurable through environment variables.

Configuration

Environment variable name Description
BG_COLOR Background color for the website (defaults to โฌ›๏ธ)
FG_COLOR Foreground (text) color (defaults to โฌœ๏ธ)
MESSAGE Message to be displayed (defaults to background color name, if not provided)
VERSION App version, returned from /version endpoint (defaults to package version, if not provided)

The colors can be provided as names (red, green) or as HEX values (#FF0000, #00ff00).

Usage

Command Rendered Page
node app.js Default page
FG_COLOR=blue BG_COLOR=lightgreen node app.js Light green
MESSAGE="Hello world!" FG_COLOR="#f3f4f6" BG_COLOR="#2563eb" node app.js Blue white with message

Using Docker image

You can also run the application as a Docker container. You can pull the image from pj3677/color-app:1.0.0.

Example usage:

docker run --env FG_COLOR="blue" -p 3000:3000 pj3677/color-app:1.0.0

color-app's People

Contributors

peterj avatar dependabot[bot] avatar nontster avatar

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.