-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gregory COCHON
authored and
Gregory COCHON
committed
Dec 19, 2017
1 parent
eeef4fa
commit 3c10481
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 TECH'advantage | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# edc httpd | ||
|
||
edc httpd is an embedded httpd server to serve the edc documention in standalone java application. | ||
|
||
## Configuration | ||
|
||
### Define the path | ||
In the `src/main/java/resources` folder, create the file: `webserver.yml`. | ||
Define the `base`variable to define the path to the published documentation. | ||
|
||
```yaml | ||
base: /local/edc-httpd/html | ||
``` | ||
*Optional* | ||
It is possible to override the default port (8088). You have to create a `server.yml` file and define its content like this: | ||
|
||
```yaml | ||
httpPort: 9000 | ||
ip: 0.0.0.0 | ||
enableHttp: true | ||
``` | ||
|
||
Modify the `httpPort` to define the nw port value. | ||
|
||
### Add the dependency | ||
|
||
**Maven** | ||
|
||
Add the dependency in your `pom.xml` for maven | ||
|
||
```xml | ||
<dependency> | ||
<groupId>fr.techad.edc</groupId> | ||
<artifactId>httpd-java</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
``` | ||
|
||
**Gradle** | ||
|
||
```groovy | ||
compile group: 'fr.techad.edc', name: 'httpd-java', version: '1.0.0' | ||
``` | ||
|
||
### Start the server | ||
|
||
To start the start, add | ||
|
||
```java | ||
package fr.techad.edc.demo; | ||
import fr.techad.edc.httpd.EdcWebServer; | ||
public class Main { | ||
public static void main(String[] args) { | ||
EdcWebServer.run(); | ||
/* ... */ | ||
} | ||
} | ||
``` | ||
|
||
## License | ||
|
||
MIT [TECH'advantage](mailto:contact@tech-advantage.com) |