A Reactive Java HTTP server implementing https://github.com/8thlight/cob_spec
Check out the Design Decisions for an overview on how this server is constructed
- Java 8
- SnakeYaml (for routing; set in the maven build)
clone this repo.
$ cd LOCAL/REPO/ROOT
$ mvn clean compile assembly:single
$ java -jar target/OctoberServer.jar [-p PORT] [-d /PATH/TO/DIRECTORY/TO/SERVE/FROM] [-c /PATH/TO/SPECIAL/ROUTES/CONFIG.yml]
When configuring this with cob_spec, be sure to specify -c
or it won't run.
Cob_spec runs your server from the home directory, not the project's root.
This will break a server that relies on files and expects to run in the project's root.
$ mvn test
- in a terminal:
- clone cob-spec and follow setup instructions.
- Run cob-spec on port
9090
- in the browser:
- Navigate to the Server Start Edit Page
in theSERVER_START_COMMAND {
java -jar /PATH/TO/OctoberServer/target/OctoberServer.jar -c /PATH/TO/OctoberServer/src/test/java/Mocks/cob_spec_routes_config.yml -d PATH/TO/cob_spec/public
}
Note: cob-spec starts the server from the user's home directory, not the repo's root.
Make sure to specify the path to the.jar
and thecob_spec_config.yml
from that reference. - Save the page.
- Load this link to start the test, or just click the
suite
link at the top of the page.