Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
Wiki usage
Tutorials
FAQ
License

HTTP Server



The wiki is accessible through an index.html page which is directly in the output directory.

There are two ways to open the wiki:
  • By double clicking on the index.html page
  • By starting an HTTP server and browse the content of the wiki at localhost. A Java HTTP Server, a Python 2, and a Python 3 HTTP Server are provided
  • By double clicking on the server.bat console file (or server.sh on Linux or MacOS X) and browse the content of the wiki at the http://localhost:8080/ address
Using an HTTP Server will improve the Full text search feature.

The server.bat and the HTTPServer.jar files are in the httpserver distribution directory. You need to have a JRE (at least Java 8) to be able to start this server). The py2server.bat and py3server.bat aez also in the httpserver distribution directory.

Deploying the server

Java HTTP server

By default the following files should be present in the same directory as the index.html page:
  • The HttpServer.jar file
  • The server.bat console file (or the server.sh file on Linux or MacOS X)
The server.bat console file has the following content:
      java -jar HttpServer.jar
      pause
It is possible to put these files in another directory, and set the -d or --dir argument to specify the directory of the wiki. For example:
      java -jar HttpServer.jar -d L:\my\wiki
      pause
It is possible to set the -p or --port argument to specify the port to access for the wiki. For example:
      java -jar HttpServer.jar -p 8082
      pause

Python 2 HTTP server

The py2server.bat bat file allows to start a Python 2 HTTP server. The console file has the following content:
      python -m SimpleHTTPServer 8080
      pause
It is possibleto specify the port to access for the wiki. For example:
      python -m SimpleHTTPServer 8082
      pause

Python 3 HTTP server

The py3server.bat bat file allows to start a Python 3 HTTP server. The console file has the following content:
      py -m http.server 8080
      pause
It is possibleto specify the port to access for the wiki. For example:
      py -m http.server 8082
      pause

Cross-origin resource sharing


The reason why you will not see the context of the search if you open the wiki in the browser by double clicking on the index.html page is because of the Cross-origin resource sharing policy (CORS).

See also


Categories: General

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.

Project Web Hosted by SourceForge.net Copyright 1999-2010 - Geeknet, Inc., All Rights Reserved About - Legal - Help