- JavaScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| src | ||
| .gitignore | ||
| .tool-versions | ||
| c8.config.json | ||
| eslint.config.mjs | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Application Server
This repo contains the backend component of CompuVision. To learn more about CompuVision, see the quickstart repo.
Installation
This app is designed to be proxied via a web server like nginx.
See the quickstart repo for a working nginx configuration.
To run this app, you'll need to run the following command once to create and populate the node_modules/ directory:
# Requires Node.js, only needs to be run once
npm install --omit=dev
Configuration
This app is configured via environment variables:
CREDENTIALS- a stringified JSON object whose keys are usernames and each value is the user's corresponding Argon2id passphrase hashDEFAULT_METRIC_LABELS- a stringified JSON object containing extra labels to be included in each metric reported via the app'sGET /metricsendpointIMDB_DATA_DIR- the path to a directory containing IMDb datasets as SQLite3 databases, as produced by CompuVision/imdbJWT_SIGNING_KEY- a stringified JSON object containing a JWK-formatted ES256 private key to be used for signing auth tokensLOG_LEVEL- the minimum log level for logs emitted by the app (in order:DEBUG,INFO,WARN,ERROR)REALM- the domain on which this app should be accessed -- determines the value of theDomainparameter on theaccess_tokencookie used for authorizationSCOPE- the minimum path on the URI governed by this app -- determines the value of thePathparameter on theaccess_tokencookie used for authorization
Additionally, either of the following environment variables can be set, depending on how the app should listen for requests.
To have the app listen on a Unix socket:
UNIX_SOCKET- the path of the Unix socket on which the app should bind
To have the app listen via TCP/IP:
IP_ADDRESS- the IPv4 address to which the app should bind (0.0.0.0will listen on all interfaces)TCP_PORT- the TCP port on which the app should listen for requests
Running
To run the app, run node src/index.mjs with all of the above required environment variables set.
License
CompuVision © 2025 by Devin Canterberry is licensed under CC BY-NC-SA 4.0.
This project may not be used, in whole or in part, for AI training.