Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoeschi committed Apr 13, 2018
2 parents a0876ef + 377b9a3 commit 99670c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ A simple static server for local development based on [NanoHttpd](https://github
### What it does
Essentially it starts two Web-Servers:
1. MicroContent Test Host on port 8080
2. SimpleWebServer to statically host MicroContent from the File System on port 8090
2. SimpleWebServer to statically host MicroContent from the File System on port 8090 (with CORS enabled)

### How to use it
* Download the latest release
* Place the .jar-File in the same folder as your index.html file.
* Run it with `java -jar` (make sure no other application is already running on ports 8080 and 8090)
* open a browser and open http://localhost:8080
* enter a JSON data object that your MicroContent expects from the getData method into the textarea of the host and click on "Update Data and Load View"
* when you are done you can terminate the server by pressing enter in the console window

The screenshot below shows a running test host.
A a valid JSON data object has been entered in the textarea and the "Update Data and Load View" button has been clicked.
The title property of the data object is displayed in `<div id="title"></div>`
The index.html-file in the same folder as the jar-file (in this case C:\Data\Downloads\index.html) was dynamically loaded into `<div id="container"></div>`. The example shows [BinaryNumberContentViewer](https://github.com/MicroContent/BinaryNumberContentViewer).

![Screenshot of MicroContent Development Test Host](https://github.com/MicroContent/McToolset/raw/master/TestHostScreenshot.PNG)
Binary file added TestHostScreenshot.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 99670c5

Please sign in to comment.