Skip to content

Latest commit

 

History

History
33 lines (30 loc) · 847 Bytes

README.md

File metadata and controls

33 lines (30 loc) · 847 Bytes

scheme-detector

Coverage

DeepSource

Detect different protocols and engines from the current environment variables.

$ env
...
DATABASE_URI=pgsql://user:[email protected]/example
EXAMPLE_API_PASS=apipass
EXAMPLE_API_URL=https://api.example.com
EXAMPLE_API_USER=apiuser
...
$ ./schemedetector
[
  {
    "engine": "pgsql",
    "port": "5432",
    "host": "pg.example.com",
    "username": "user",
    "password": "pg_pass"
  },
  {
    "engine": "https",
    "port": "443",
    "host": "api.example.com",
    "username": "apiuser",
    "password": "apipass"
  }
]