LilyWare is an express middleware for serving lilypond files. Written in TypeScript; ships with type declarations.
app.use(lilyware(basePath))Looks in basePath for requested .ly files and serves them
rendered according to the URL query string
(e.g. test.ly?format=png&resolution=30).
Requests that do not end in .ly are passed through with next().
app.use(lilyware(basePath, {
cache: true, // default: in-memory cache keyed by file mtime
renderer: ..., // optional override for the lilynode.renderFile callable
// (mainly useful for testing)
}))Possible options to configure rendering via URL query parameters.
Possible values: png, svg, pdf, ps, midi
Default: png
Unsupported values return 400 Bad Request.
Resolution in ppcm (only meaningful for the png format).
Default: 50
| Status | When |
|---|---|
200 |
Rendered output, with the matching Content-Type |
400 |
format query param is not supported |
403 |
Path attempts to escape basePath |
404 |
.ly file does not exist |
500 |
Renderer error (forwarded via next(error)) |