output-service v0.92.4-pdflib
output-service
Manage outputs
Api
Query
output(id)
{
output(id: ""){
url
}
}
Mutation
createOutputFromConfiguration(input)
mutation {
createOutputFromConfiguration(input: {}) {
output{
id
url
}
}
}
Deployment
optimal setting for conversion
resources:
cpu: 2
memory: 4096Mi
service:
PARALLEL_IMAGES_COUNT: 4
Development
node-gyp
This project has a dependency on node-gyp
. See https://www.npmjs.com/package/node-gyp for installation instructions, the key components of which are repeated below.
Build on Windows
To build locally on Windows 10 first install node-gyp
https://gist.github.com/jtrefry/fd0ea70a89e2c3b7779c
modify the install to add c++
then Windows sdk 8.1
https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk
docker-compose up
Build on Linux / WSL with apt
node-gyp dependencies
node-gyp
depends on python 2
, make
and a C++ compiler such as g++
.
Python 2
Check python 2 is installed:
$ python --version
If it is not installed, install with apt:
$ sudo apt install python
To confirm python is installed, check the version:
$ python --version
Python 2.7.15rc1
Note from the node-gyp's npm page:
python (v2.7 recommended, v3.x.x is not supported)
make
Ensure
make
is installed.$ make --version GNU Make 4.1
g++
Ensure
g++
is installed. Example error on build:error <path>/node_modules/inotify: Command failed. Exit code: 1 Command: node-gyp rebuild ... make: g++: Command not found
Install
g++
:$ sudo apt install g++
Confirm it is installed by checking the version:
$ g++ --version g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Install node-gyp
$ yarn global add node-gyp
or
$ npm install -g node-gyp
Tools
Dependencies
- docker
- docker-compose
Requirements
- eslint linting
- 100% unit test coverage
Scripts
Command | Description |
---|---|
start | Starts the service |
start:watch | Starts the service with watch and inspect |
lint | Checks project linting |
lint:fix | Checks project linting and fixes what it can |
test | Test runner |
test:watch | Test runner with watch |
coverage | Coverage checker |
coverage:watch | Coverage checker with watch |
ci | Run CI checks |
Coveralls
$COVERALLS_REPO_TOKEN
env var must be provided in the project settings
Print Output
Image Conversion
Image conversion happens in src/convert/imageMagick
2 years ago