Added more detailed dependency installation instructions as suggested in https://github.com/openjournals/joss-reviews/issues/1592#issuecomment-515789575
This commit is contained in:
parent
dcc6090678
commit
99d14cf841
5 changed files with 38 additions and 14 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -25,4 +25,4 @@ status_code_test
|
||||||
# Visual Studio 2015/2017 cache/options directory
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
.vs
|
.vs
|
||||||
|
|
||||||
doxygen/documentation
|
docs/doxygen_output
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ pages:
|
||||||
image: alpine
|
image: alpine
|
||||||
script:
|
script:
|
||||||
- apk update && apk add doxygen
|
- apk update && apk add doxygen
|
||||||
- cd .. && doxygen doxygen/Doxyfile
|
- cd .. && doxygen docs/Doxyfile
|
||||||
- mv doxygen/documentation/html/ public/
|
- mv docs/doxygen_output/html/ public/
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
|
|
||||||
21
README.md
21
README.md
|
|
@ -1,11 +1,10 @@
|
||||||
Simple-Web-Server
|
# Simple-Web-Server
|
||||||
=================
|
|
||||||
|
|
||||||
A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Asio (both Boost.Asio and standalone Asio can be used). Created to be an easy way to make REST resources available from C++ applications.
|
A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Asio (both Boost.Asio and standalone Asio can be used). Created to be an easy way to make REST resources available from C++ applications.
|
||||||
|
|
||||||
See https://gitlab.com/eidheim/Simple-WebSocket-Server for an easy way to make WebSocket/WebSocket Secure endpoints in C++. Also, feel free to check out the new C++ IDE supporting C++11/14/17: https://gitlab.com/cppit/jucipp.
|
See https://gitlab.com/eidheim/Simple-WebSocket-Server for an easy way to make WebSocket/WebSocket Secure endpoints in C++. Also, feel free to check out the new C++ IDE supporting C++11/14/17: https://gitlab.com/cppit/jucipp.
|
||||||
|
|
||||||
### Features
|
## Features
|
||||||
|
|
||||||
* Asynchronous request handling
|
* Asynchronous request handling
|
||||||
* Thread pool if needed
|
* Thread pool if needed
|
||||||
|
|
@ -18,7 +17,7 @@ See https://gitlab.com/eidheim/Simple-WebSocket-Server for an easy way to make W
|
||||||
* Sending outgoing messages is thread safe
|
* Sending outgoing messages is thread safe
|
||||||
* Client creates necessary connections and perform reconnects when needed
|
* Client creates necessary connections and perform reconnects when needed
|
||||||
|
|
||||||
### Usage
|
## Usage
|
||||||
|
|
||||||
See [http_examples.cpp](https://gitlab.com/eidheim/Simple-Web-Server/blob/master/http_examples.cpp) or
|
See [http_examples.cpp](https://gitlab.com/eidheim/Simple-Web-Server/blob/master/http_examples.cpp) or
|
||||||
[https_examples.cpp](https://gitlab.com/eidheim/Simple-Web-Server/blob/master/https_examples.cpp) for example usage.
|
[https_examples.cpp](https://gitlab.com/eidheim/Simple-Web-Server/blob/master/https_examples.cpp) for example usage.
|
||||||
|
|
@ -26,13 +25,15 @@ Particularly, the JSON-POST (using Boost.PropertyTree) and the GET /match/[numbe
|
||||||
|
|
||||||
[Documentation](https://eidheim.gitlab.io/Simple-Web-Server/annotated.html) is also available, generated from the master branch.
|
[Documentation](https://eidheim.gitlab.io/Simple-Web-Server/annotated.html) is also available, generated from the master branch.
|
||||||
|
|
||||||
### Dependencies
|
## Dependencies
|
||||||
|
|
||||||
* Boost.Asio or standalone Asio
|
* Boost.Asio or standalone Asio
|
||||||
* Boost is required to compile the examples
|
* Boost is required to compile the examples
|
||||||
* For HTTPS: OpenSSL libraries
|
* For HTTPS: OpenSSL libraries
|
||||||
|
|
||||||
### Compile and run
|
See [dependency installation instructions](https://gitlab.com/eidheim/Simple-Web-Server/blob/master/docs/dependency_install.md) for further information.
|
||||||
|
|
||||||
|
## Compile and run
|
||||||
|
|
||||||
Compile with a C++11 compliant compiler:
|
Compile with a C++11 compliant compiler:
|
||||||
```sh
|
```sh
|
||||||
|
|
@ -43,13 +44,13 @@ make
|
||||||
cd ..
|
cd ..
|
||||||
```
|
```
|
||||||
|
|
||||||
#### HTTP
|
### HTTP
|
||||||
|
|
||||||
Run the server and client examples: `./build/http_examples`
|
Run the server and client examples: `./build/http_examples`
|
||||||
|
|
||||||
Direct your favorite browser to for instance http://localhost:8080/
|
Direct your favorite browser to for instance http://localhost:8080/
|
||||||
|
|
||||||
#### HTTPS
|
### HTTPS
|
||||||
|
|
||||||
Before running the server, an RSA private key (server.key) and an SSL certificate (server.crt) must be created.
|
Before running the server, an RSA private key (server.key) and an SSL certificate (server.crt) must be created.
|
||||||
|
|
||||||
|
|
@ -57,7 +58,7 @@ Run the server and client examples: `./build/https_examples`
|
||||||
|
|
||||||
Direct your favorite browser to for instance https://localhost:8080/
|
Direct your favorite browser to for instance https://localhost:8080/
|
||||||
|
|
||||||
### Contributing
|
## Contributing
|
||||||
|
|
||||||
Contributions are welcome, either by creating an issue or a merge request.
|
Contributions are welcome, either by creating an issue or a merge request.
|
||||||
However, before you create a new issue or merge request, please search for previous similar issues or requests.
|
However, before you create a new issue or merge request, please search for previous similar issues or requests.
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ PROJECT_LOGO =
|
||||||
# entered, it will be relative to the location where doxygen was started. If
|
# entered, it will be relative to the location where doxygen was started. If
|
||||||
# left blank the current directory will be used.
|
# left blank the current directory will be used.
|
||||||
|
|
||||||
OUTPUT_DIRECTORY = doxygen/documentation
|
OUTPUT_DIRECTORY = docs/doxygen_output
|
||||||
|
|
||||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||||
# directories (in 2 levels) under the output directory of each output format and
|
# directories (in 2 levels) under the output directory of each output format and
|
||||||
23
docs/dependency_install.md
Normal file
23
docs/dependency_install.md
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Dependency installation instructions
|
||||||
|
|
||||||
|
Installation instructions for the dependencies of the example files on a selection of platforms.
|
||||||
|
|
||||||
|
Default build with Boost.Asio is assumed. Turn on CMake option `USE_STANDALONE_ASIO` to instead use standalone Asio.
|
||||||
|
|
||||||
|
## Debian based distributions
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo apt-get install libssl-dev libboost-filesystem-dev libboost-thread-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Arch Linux based distributions
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo pacman -S boost
|
||||||
|
```
|
||||||
|
|
||||||
|
## MacOS
|
||||||
|
|
||||||
|
```sh
|
||||||
|
brew install openssl boost
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue