This project provides a docker image to help the publishing of versioned static files like js libs, shared CSS, micro-frontend components, and more. You can use it for a public service or behind a protected service, with a configurable CORS header.
So... Try it:
$ docker run \
-p 8080:80 \
-v /path/to/public-dir:/usr/share/nginx/html \
-e CORS_RE='^https?:\/\/([a-z]+\.)*example\.com(:\d+)?$' \
aurium/semver-file-server
...then visit http://localhost:8080/inner/path/to/versioned-thing
Your public-dir should have versioned files with @<MAJOR>.<MINOR>.<PATH> just before the extension and versioned directories with @<MAJOR>.<MINOR>.<PATH> on the end of the name.
See this example directory.
Like most public JS CDN, when you ask for some file, it redirects you to the path of the right file in the last version.
It expects you to publish files or directories appended with @<VERSION>.
So you can request without version definition, defining only the major with @<MAJOR> or @<MAJOR>.*.*., or de major and minor as well. Then you will get redirected to the correct path.
Features:
index.js.package.json's defined main file.*./browse/.It is done by NGINX with some "njs scripting language". It has nodejs unit tests and curl based behavior tests.