Runtime config
the defaults are fine at the time of writing this, only change this if the svg output from osu server changes
FLAG_DENSITY
: the density in the svg from osu servers, defaults to 72FLAG_WIDTH
: the width in the svg from osu servers, defaults to 36
MAX_SIZE
: the max allowed flag size, defaults to 1000DEFAULT_SIZE
: the default flag size if no size is given in the request, defaults to 128CACHE_SECONDS
: amount of seconds to cache svg from osu servers, defaults to one week
HTTP_TIMEOUT
: http timeout in ms when doing a http request (to fetch new svg from osu server), defaults to 1000 or one second
LISTEN
: either a port or a socket path, defaults to 3000LISTEN_HOST
: ifLISTEN
is a port the hostname to listen on, defaults to localhostLISTEN_CHMOD
: ifLISTEN
is a socket path, optionally apply this chmod to the socker after create
REDIS_SOCKET
: socket path to redis, if specified will use this, otherwise uses the next optionsREDIS_PORT
: redis port to connect to, if not specified will try to connect to default redis portREDIS_HOST
: optionally the redis host if its not localhostREDIS_PREFIX
: the prefix of all keys, defaults toosu-flags-proxy
Run npm i
to install all dependencies. Run npm run build
and npm run start
to start the program.