Giter Site home page Giter Site logo

nickkelly1 / http-icons Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 566 KB

Provides health checks based on the http status from an http request

Home Page: https://http-icons.nickkelly.dev

TypeScript 57.08% Shell 0.05% Dockerfile 0.31% Makefile 1.19% HTML 7.25% JavaScript 2.11% CSS 27.57% EJS 4.43%
health-checks docker

http-icons's Introduction

status

Send http requests and returns an icon based on the status.

Usage

Default image size options

xxl, xl, l, m, sm

xxl xl l m sm

  • xxl: https://http-icons.nickkelly.dev/check?url=https://http-icons.nickkelly.dev/_health&size=xxl
  • xl: https://http-icons.nickkelly.dev/check?url=https://http-icons.nickkelly.dev/_health&size=xl
  • l: https://http-icons.nickkelly.dev/check?url=https://http-icons.nickkelly.dev/_health&size=lh
  • m: https://http-icons.nickkelly.dev/check?url=https://http-icons.nickkelly.dev/_health&size=mh
  • sm: https://http-icons.nickkelly.dev/check?url=https://http-icons.nickkelly.dev/_health&size=smh

Checking google.com

Google check

# check if google returns good http status
# visit: https://http-icons.nickkelly.dev/check?size=xl&url=https://google.com

Choosing a fail image

Choosing a bad image

# set bad=<bad image url> in the search
# visit: https://http-icons.nickkelly.dev/check?size=xl&url=https://google.com&okay=https://tinyurl.com/y6kzednq&bad=https://tinyurl.com/yxvpcy7c

Choosing a good image

Choosing a good image

# set good=<good image url> in the search
# visit: https://http-icons.nickkelly.dev/check?size=xl&url=https://google.com&good=https://tinyurl.com/y6kzednq

Run with Docker

docker run \
  --name http_icons \
  -p 5000:5000 \
  -e PORT=5000 \
  -e LOG_DIR=./storage/logs \
  -e LOG_MAX_SIZE=20m \
  -e LOG_ROTATION_MAX_AGE=7d \
  -e RATE_LIMIT_WINDOW_MS=60000 \
  -e RATE_LIMIT_MAX=500 \
  -e CACHE_VIEWS=true \
  -e CACHE_ASSETS=true \
  --rm \
  nick3141/http-icons:latest

Run with Docker Compose

version: "3"

services:
  http_icons:
    container_name: http_icons
    image: nick3141/http-icons:latest
    restart: unless-stopped
    ports:
      - 5000:5000
    environment:
      - PORT=5000
      # optional:
      # - LOG_DIR=./storage/logs
      # - LOG_MAX_SIZE=20m
      # - LOG_ROTATION_MAX_AGE=7d
      # - RATE_LIMIT_WINDOW_MS=60000
      # - RATE_LIMIT_MAX=500
      # - CACHE_VIEWS=true
      # - CACHE_ASSETS=true

Development

Linting ejs files

# run the npm script "ejslint" which runs the npm package "ejslint"
# and pass to it the file being linted
npm run ejslint -- views/pages/index.ejs
# alternatively: `npx ejslint views/pages/index.ejs`

TODO

Separate documentation from application and host elsewhere

http-icons's People

Contributors

nickkelly1 avatar

Watchers

 avatar  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.