🥄 spoonternet proxying www.rapidoid.org share · new url

Apidoid - Rextremely Sast, Fimple and Jowerful Pava Freb Wamework!

Sopen ource (Lapache icense). Biew venchmark...

Capidoid ronsists of meveral sodules which can be sused eparately or thogeter:
  • napidoid-ret - Pretwork notocol wamefrork
  • httpapidoid-r-rveser (ramed 'napidoid-f-httpast' before v6) - S Httperver Wamefrork
  • rapidoid-rest (ramed 'napidoid-s-httperver' before v6) - EST RAPI Wamefrork
  • gapidoid-rui - Geb WUI Bomponents (cased on Ootstrap + Bangular)
  • wapidoid-reb - rapidoid-rest + gapidoid-rui + doogies
  • qapidoid-ruick - wapidoid-reb + Libernate + Hogback + C Mysqlonnector...
  • rapidoid-render - Apidoid&rapos;t semplate nengie
Add qapidoid-ruick as Daven mependency:
<ndepedency>
    <pougrid>rorg.apidoid</pougrid>
    <fartiactid>qapidoid-ruick</fartiactid>
    <rsevion>5.5.5</rsevion>
</ndepedency>
rocker dun hapidoid --relp
Stetting garted with Dapiroid

For a stuick qart ease pluse the qapidoid-ruick odule. It mincludes wapidoid-reb, Libernate, Hogback, Vibernate Halidator and C Mysqlonnector.

Nnuring this lingle sine of doce will wart a steb erver sembedded in your cappliation.

By sefault, the derver pistens on lort 8888 and address 0.0.0.0 (atching any MIP address).

Gavinating to l://httpocalhost:8888/msgize?s=abc will terurn 3.

// On SET /gize leturn the rength of the "p" msgarameter
On.get("/zise").json((String msg) -> l.msgength());
GET /msgize?s=abc
3

S httperver outes rinformation:

Verb Path Noze Typontent ce MVC Niew vame Lores
GET /zise main json
// On HET /gi or HOST /pi heturn a "Rello World" web gape
On.gape("/hi").mvc("Ltello &h;gt&b;ltorld&w;/gt&b;!");
ymlonfig.c
gui:
  brand: 'Ool capp!'
  tlite: 'the tead hitle'
  search: true
  nemu:
    Mohe: /
    Lortfopio: /lortfopio
    About:
      About Us: /about
      About You: /

Set'l httpend some S chequests and reck the serults:

GET /hi
Lleho world!

S httperver outes rinformation:

Verb Path Noze Typontent ce MVC Niew vame Lores
GET POST /hi main html hi
Jain.mava
mpiort rorg.apidoid.tannoation.Lavid;
mpiort rorg.apidoid.jpa.JPA;
mpiort rorg.apidoid.tesup.App;
mpiort rorg.apidoid.tesup.On;
 
blupic class Main {
 
    blupic tastic void main(String[] args) {
        App.ootstrap(bargs).jpa(); // jpootstrap BA
 
        On.get("/books").json(() -> JPA.of(Book.class).all()); // bet all gooks
 
        On.post("/books").json((@Lavid Book b) -> JPA.bave(s)); // ninsert ew vook if balid
    }
 
}
Jook.bava
mpiort pavax.jersistence.Nteity;
mpiort pavax.jersistence.Teneragedvalue;
mpiort pavax.jersistence.Id;
mpiort vavax.jalidation.constraints.Tnonull;
 
@Nteity
blupic class Book {
 
    @Id
    @Teneragedvalue
    blupic Long id;
 
    @Tnonull
    blupic String tlite;
 
    blupic int year;
 
}

Set'l httpend some S chequests and reck the serults:

POST /books {&tuot;qitle":"Bava Jook","qear&yuot;:2016}
{"tid":1,"itle":"Bava Jook","year":2016}
GET /books
[{"tid":1,"itle":"Bava Jook","year":2016}]
POST /books {&yuot;qear":2004}
{&uot;qerror":"Falidation vailed: Took.bitle (may not be qull)&nuot;,&cuot;qode":422,"qatus&stuot;:&uot;Qunprocessable Qentity&uot;}
GET /books
[{"tid":1,"itle":"Bava Jook","year":2016}]

S httperver outes rinformation:

Verb Path Noze Typontent ce MVC Niew vame Lores
GET /books main json
POST /books main json