# wrapper-client **Repository Path**: mirrors_Financial-Times/wrapper-client ## Basic Information - **Project Name**: wrapper-client - **Description**: FT wrapper client reference implementation (Node.js) - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-07-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README About ----- This is a reference web app which grabs an FT wrapper and populates it with third party content and renders the result in a web browser. It uses the `ft-node-modules/wrapper` and `ft-node-modules/logger` modules available at https://github.com/Financial-Times/ft-node-modules. It also does some cool stuff like: - clustering the web workers up to the available CPUs - this also works on Heroku as each Dyno has 4 cores, - provides an API-first approach to retrieve and process wrappers using Swagger API - uses doT templating with some regex config changes to easily process the `` style FT wrapper variables This app is also deployed to Heroku http://wrapper-client.herokuapp.com/docs and uses: - Nodefly for realtime monitoring `heroku addons:open nodefly` - Nodetime for process monitoring `heroku addons:open nodetime` - Loggly for logging `heroku addons:open loggly` or https://financialtimes.loggly.com/ - Blitz for load testing `heroku addons:open blitz` - Loader.io for load testing `heroku addons:open loaderio` Use cases --------- You are a known FT third-party supplier of content and you have been set up with one of more wrappers provided by the FT. You will have been given a url for each wrapper that serves the raw wrapper with placeholder variables for you to insert your content. By cloning this app and deploying it to your servers, you will be able to create Running ------- npm install node app.js Usage ----- Use the API to make requests http://localhost:5000/docs There are two endpoints - GET a wrapper - POST a JSON model (see `api/sampleData.js`) to a wrapper and get the resulting HTML Sample CURL request to process a wrapper with a model ------ curl "http://wrapper-client.herokuapp.com/page/code-sample?api_key=dev" -H "Content-Type: application/json" --data-binary "{\"headWrapperCss\":\"\",\"footWrapperJs\":\"\",\"code\":{\"metaTitle\":\"
Main content well
Right hand content well
Second column content well