Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
87 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
/.exploded/ | ||
/bin/ | ||
/eg.jooby-1.0.0.cas | ||
/eg.jooby-1.0.0.jar | ||
/eg.jooby*-1.0.0.* | ||
.DS_Store | ||
/modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
native ("jvm") | ||
module eg.jooby.rest "1.0.0" { | ||
shared import maven:org.jooby:"jooby-undertow" "1.1.0"; | ||
import maven:org.jooby:"jooby-jackson" "1.1.0"; | ||
import java.base "8"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"Default documentation for package `eg.jooby.rest`." | ||
|
||
shared package eg.jooby.rest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import java.util.concurrent.atomic { | ||
AtomicInteger | ||
} | ||
|
||
import org.jooby { | ||
Jooby | ||
} | ||
import org.jooby.json { | ||
Jackson | ||
} | ||
import org.jooby.mvc { | ||
path, | ||
get | ||
} | ||
|
||
shared void run() => Jooby.run(App, *process.arguments); | ||
|
||
class App() extends Jooby() { | ||
use(Jackson()); | ||
use(`Greetings`); | ||
} | ||
|
||
path { "/mvc" } | ||
shared class Greetings() { | ||
|
||
get path { "/greeting" } | ||
shared Greeting helloWorld() => Greeting(); | ||
|
||
get path { "/greeting/:name" } | ||
shared Greeting hello(String name) => Greeting(name); | ||
|
||
} | ||
|
||
shared class Greeting { | ||
|
||
static value idgen = AtomicInteger(); | ||
|
||
shared Integer id; | ||
shared String name; | ||
|
||
shared String salutation = "Hello"; | ||
|
||
shared new (String name = "World") { | ||
this.id = idgen.incrementAndGet(); | ||
this.name = name; | ||
} | ||
|
||
string => name; | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
source/eg/jooby/module.ceylon → source/eg/jooby/simple/module.ceylon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
native ("jvm") | ||
module eg.jooby "1.0.0" { | ||
module eg.jooby.simple "1.0.0" { | ||
import maven:org.jooby:"jooby-undertow" "1.1.0"; | ||
import ceylon.html "1.3.2"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
shared package eg.jooby.simple; |
File renamed without changes.