Web server for converting files using unoserver
Using Dockerhub Image:
docker run -d -p 3000:3000 lynxtaa/unoserver-web:latest
curl \
--request POST 'http://localhost:3000/convert/pdf' \
--form 'file=@"/path/to/file.docx"' \
-o my.pdf
Variable | Description | Default |
---|---|---|
PORT | Application port | 3000 |
MAX_WORKERS | Maximum number of LibreOffice workers | 8 |
BASE_PATH | Prefix path | |
REQUEST_ID_HEADER | The header name used to set the request-id | |
REQUEST_ID_LOG_LABEL | Defines the label used for the request identifier when logging the request | reqId |
To spin up the container for development use VSCode Remote Containers feature. See .devcontainer/devcontainer.json
for reference.
If you need to support more custom fonts, you could add them to fonts
folder.
Commands:
pnpm run dev
- runs the app in watch-mode, then you could access a Swagger UI fromhttp://0.0.0.0:3000
pnpm run build && pnpm run start
- builds and starts a production version of the apppnpm run validate
- runs linting, typechecking and formatting checkpnpm run test
- runs all the tests
docker build --build-arg NODE_ENV=production --tag unoserver-web:dev .
docker run --rm -p 3000:3000 unoserver-web:dev