This is a lightweight, fast nodejs-express server for asset proxying and image manipulation (resizing, greyscaling, webp format transformation). It streams assets from other urls, from s3 buckets, out of github repos and can render via external servers.
Check the README of backend-modules-assets which contains all the relevant code.
This backend exposes the express middleware of backend-modules-assets. This was previously handled by republik-backend and publikator-backend themselfs but was extracted to this standalone server to be able to deploy and scale the network heavy image fetching and cpu intensive image resizing independently from the other backends. UnLike the other backends this server does not support auth and depends on express directly.
You need to have node (8.3.0+) installed and postgres running somewhere.
Boostrap your .env file (copy .env.example). Also see backend-modules-assets README
The following ENVs have a dependency to other servers:
# must be in sync with PUBLIC_URL
ASSETS_SERVER_BASE_URL=http://localhost:3021
# must be in sync with republik-backend and publikator-backend
ASSETS_HMAC_KEY=aiy3sheYoobahb4eth1ohs4aoPaezeeg
# base url used on /frontend
FRONTEND_BASE_URL=http://localhost:3010
# allowlist buckets with regions for /s3
AWS_BUCKET_ALLOWLIST=republik-assets:eu-central-1
Install dependencies.
yarn install
Run it.
yarn dev
The source code and it's documentation is licensed under GNU AGPLv3+.