This is a simple sample host page to test MicroContentViewers. You can provide data and the url to MicroContentViewer as query parameters.
Examples:
http://wherever-this-page-is-hosted.com/index.html?data={%20%22number%22:%2012,%20%22title%22:%20%22my%20title%22}&url=https://raw.githubusercontent.com/MicroContent/BinaryNumberContentViewer/2e8055272880ce5ba30175240aa18721addf140c/index.html
http://localhost:5001/?data={%22title%22:%20%22my%20title%22}&url=http://localhost:5000
This is a tool for developers of MicroContentViewers. You can test your MicroContentViewers as you develop by hosting your code locally (e.g. using http-server). Don't forget to enable cors!
Easiest setup: (0. download node.js/npm)
- go to your commandline and type:
npm install http-server -g
- download this index.html to a folder, open a commandline in that folder and run
http-server . -p 5001 --cors
- create the index file of your MicroContentViewer in a folder, open a commandline in that folder and run
http-server . -p 5000 --cors
- open a browser and enter:
http://localhost:5001/?data={%22title%22:%20%22my%20title%22}&url=http://localhost:5000
- edit the data query parameter as needed
To make it even easier I host a version of this static index.html on my website at http://goeschlberger.com/microcontent
Working examples:
pro tip: You can use your browsers developer console and enter encodeURIComponent('{ "title": "whatever my json-data looks like"}')