Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

This is a Java port of the php-crud-api project (single file REST API). It currently only implements the core functionality.

Dependencies

Install dependencies using:

sudo apt-get install maven openjdk-8-jdk

Then build the server.

Configuring

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.

Running

To run the api (during development) type:

mvn exec:java

In production I recommend deploying the JAR file as described below.

Building a executable JAR file

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.