This file contains hidden or 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
| package io.yiss; | |
| import org.jooby.Jooby; | |
| public class App extends Jooby { | |
| { | |
| get("/", () -> "Hello World!"); | |
| } |
This file contains hidden or 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
| package io.yiss | |
| import org.jooby.* | |
| class App : Kooby({ | |
| get { | |
| val name = param("name").value("Jooby") | |
| "Hello $name!" | |
| } |
This file contains hidden or 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
| package io.yiss; | |
| import io.javalin.*; | |
| public class JavalinApp { | |
| public static void main(String[] args) { | |
| Javalin app = Javalin.start(7000); | |
| app.get("/", ctx -> ctx.result("Hello World")); | |
| } | |
| } |
This file contains hidden or 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
| package io.yiss | |
| import io.javalin.Javalin | |
| fun main(args: Array<String>) { | |
| val app = Javalin.start(7000) | |
| app.get("/") { ctx -> ctx.result("Hello World") } | |
| } |
This file contains hidden or 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
| package io.yiss; | |
| import static spark.Spark.*; | |
| public class SparkApp { | |
| public static void main(String[] args) { | |
| get("/", (req, res) -> "Hello World"); | |
| } | |
| } |
This file contains hidden or 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
| package io.yiss | |
| import spark.Spark.* | |
| fun main(args: Array<String>) { | |
| get("/") { req, res -> "Hello World" } | |
| } |
This file contains hidden or 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
| package io.yiss; | |
| import io.micronaut.runtime.Micronaut; | |
| import io.micronaut.http.annotation.*; | |
| public class Application { | |
| public static void main(String[] args) { | |
| Micronaut.run(Application.class); | |
| } |
This file contains hidden or 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
| package io.yiss | |
| import io.micronaut.http.annotation.Controller | |
| import io.micronaut.http.annotation.Get | |
| import io.micronaut.runtime.Micronaut | |
| object Application { | |
| @JvmStatic | |
| fun main(args: Array<String>) { |
This file contains hidden or 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
| // Getting height without using extension method | |
| var height = MediaQuery.of(context).size.height; | |
| // After adding the extension method on BuildContext | |
| extension on BuildContext { | |
| double get height => MediaQuery.of(this).size.height; | |
| } | |
| var height = context.height; |
This file contains hidden or 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
| import 'package:mobx/mobx.dart'; | |
| part 'counter.g.dart'; | |
| class Counter = CounterBase with _$Counter; | |
| abstract class CounterBase with Store { | |
| @observable | |
| int value = 0; |
OlderNewer