Skip to content

muchq/LunarExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

LunarExample

This is an example application that uses LunarCat as a rest framework and Mentat for MySQL-compatible db access. To run it, you will need:

  • java 8+
  • MySQL / Percona / Maria database
use foo;

create table something (
  id bigint auto_increment primary key,
  name varchar(128) charset utf8
) engine=InnoDB default charset utf8;

Ok, now that we have that out of the way, run the example app:

git clone git@github.com:muchq/LunarExample.git && cd LunarExample
mvn clean package
java -DPORT=8080 -Dexample.db.user=root -Dexample.db.pass= -Dexample.db.host=localhost -Dexample.db.db=foo -jar target/LunarExample-1.0-SNAPSHOT.jar

Awesome, now let's make some requests:

~ curl -H "Content-Type: application/json" -X POST -d '{"name": "Andy"}' http://localhost:8080/hello
{"id":1,"name":"Andy"}%

➜  ~ curl http://localhost:8080/hello/1
{"id":1,"name":"Andy"}%

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages