This repository was archived by the owner on Feb 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
Dmytro edited this page Jan 29, 2017
·
8 revisions
To start using a framework, you must create a maven-project and paste address of the repository in pom.xml file and fill dependencies section like that:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example.group.id</groupId>
<version>0.1</version>
<artifactId>exampleId</artifactId>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.ummo93</groupId>
<artifactId>EasyWeb</artifactId>
<version>dfe6fc7e8e</version>
</dependency>
</dependencies>
</project>Go to the sources directory to Main.java file and start with:
import com.appartika.easyweb.App;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
App app = new App();
app.get("/", (req, res) -> {
return res.send("ok", 200);
});
app.listen(5000);
}
}After that, if all is right, you will may open a browser at 'localhost:5000' address, and watch an "ok" message.