|
|
After you have set up your IDE and created a Maven project you can start by adding Implify to your project.
|
|
|
|
|
|
For Maven add this to your pom.xml under dependencies:
|
|
|
```
|
|
|
<dependency>
|
|
|
<groupId>net.scrumplex</groupId>
|
|
|
<assemblyId>implify</assemblyId>
|
|
|
<version>0.0.1</version>
|
|
|
</dependency>
|
|
|
```
|
|
|
|
|
|
Now we can start by creating our Implify instance:
|
|
|
```
|
|
|
int port = 8080;
|
|
|
String identifier = "default"; // This string is used to seperate multiple instances. Used for thread names and exceptions.
|
|
|
ImplifyServer implifyServer = new ImplifyServer(port, "identifier");
|
|
|
```
|
|
|
|
|
|
Optionally we can set a LogLevel, so we can see debug messages:
|
|
|
```
|
|
|
implifyServer.setLogLevel(Level.ALL); // java.util.logging.Level
|
|
|
```
|
|
|
|
|
|
After that we can already start out instance:
|
|
|
```
|
|
|
...
|
|
|
try {
|
|
|
implifyServer.start();
|
|
|
} catch (ImplifyException e) { // All exceptions occurring while starting are wrapped in this ImplifyException
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
```´
|
|
|
|
|
|
Now if you go to `http://localhost:8080` in your browser you will see something similiar to this:
|
|
|
![Screenshot of default page](https://i.gyazo.com/328eb1271bc2ab1b2ee6da42a008ff77.png)
|
|
|
|
|
|
For configuraing HTTPHandlers refer to [this](#) post. |
|
|
\ No newline at end of file |