Salieri is a lightweight Express-based server written in ES6 for experimenting with the composition of web content using JSON envelopes and Mustache templates. It is not intended for production use.
## Requirements
- Node.js v6 and above is required (because some features of ES6 are used)
## Installation
git clone
this GitHub repo- Run
npm install -g salieri
to be able to invoke it from anywhere (optional)
$ salieri --help
Usage: salieri [options] -t <template> -c <config>
Options:
--template, -t path to page template [required]
--config, -c path to page config JSON [required]
--cert use specified client certificate for TLS
--cacert use specified CA certificate for TLS
--labelall, -l show labels for all components to help with debugging
[default: false]
--help Show help [boolean]
For example:
$ salieri -c myconfig.json -t mytemplate.mustache
Salieri runs on port 3000 by default. Once it is running, point your browser at http://localhost:3000/
## Parameters
Endpoint parameters may be passed via the query string and will be interpolated into the page config JSON, for example:
http://localhost:3000/?topic=8abd564a-2b8e-401c-9916-34982cb67b55&country=gb
salieri uses the request
module (via request-promise
) to perform HTTP requests, so verbose console output to assist with debugging connection issues can be enabled by setting NODE_DEBUG=request
; see https://github.com/request/request#debugging
### "unable to get local issuer certificate"
This error means that you have specified one or more HTTPS endpoints with certificates issued by unknown certificate authorities - use the --cacert
option to specify the CA certificate.
Unit and integration and coding standards tests can be run via npm test
. For more details see the package.json
file.
- restructured as a chain of Express middleware modules
- improved appearance of component labels and more helpful console output
- added integration tests to help make development safer
- refactored to make the code easier to maintain and extend
- added some unit tests
- added
labels
andnoerrors
debugging options - command-line option parsing via yargs
### 1.0.0
- Initial version
## Known issues/limitations
- Requests not batched up to each host
- Incomplete support for respecting
must_succeed
flag