https://github.com/workshape/ws-radial-plot-prerender-server
Server to pre-render and serve radial plot images
https://github.com/workshape/ws-radial-plot-prerender-server
Last synced: about 1 year ago
JSON representation
Server to pre-render and serve radial plot images
- Host: GitHub
- URL: https://github.com/workshape/ws-radial-plot-prerender-server
- Owner: Workshape
- License: mit
- Created: 2015-02-18T14:56:46.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-04-26T13:13:14.000Z (about 10 years ago)
- Last Synced: 2025-03-27T01:51:35.438Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 44.9 KB
- Stars: 11
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

> Server to pre-render and serve radial plot images
# Prerequisites
This project uses [node-canvas](https://github.com/Automattic/node-canvas) which binds to the [Cairo](http://cairographics.org/) to manipulate graphics on a low level.
Before running the server make sure you're all set following the [node-canvas setup instructions](https://github.com/Automattic/node-canvas#installation).
# Setup
```bash
git clone git@github.com:tancredi/ws-radial-plot-prerender.git
cd ws-radial-plot-prerender
npm install
```
# Running
To start the server, run `npm start`.
The server will be started `http://localhost:2000` or listen to a custom set by the `PORT` environment variable.
# Endpoints
* `GET /size/:size/?v=values[ &c=compare_values ]` - *Render a shape of given size*
* **size** (`String`) - Standardised size of the rendered image `small : 250x250 | medium : 500x500 | large : 1000x1000`
* **v** (values) (`[ Number ]`) - Comma-separated shape values.
* **c** (compare_values) (`[ Number ]`) - Comma-separated compare shape values.
**Example:** `/size/small/?v=20,15.0,10,12,92.0002,4,16.23,75,40,23&c=10,12,20.445,50,49,25.4,10,40,41,12.004`
# License
MIT
Copyright (c) 2014 Workshape.io Ltd