This is a Java port of the php-crud-api project (single file REST API). It currently only implements the core functionality.
Install dependencies using:
sudo apt-get install maven openjdk-8-jdk
Then build the server.
In the file "core/src/main/resources/jetty.properties" you can configure the listening host and port.
In "core/src/main/resources/hikari.properties" you can configure the MySQL connection.
To run the api (during development) type:
mvn exec:java
In production I recommend deploying the JAR file as described below.
To compile everything in a single executable JAR file, run:
mvn compile assembly:single
You can execute the JAR using:
java -jar server.jar
You can see the api at work at http://localhost:8080/posts/1.