All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.lucaventuri.examples.HttpExampleMini Maven / Gradle / Ivy

There is a newer version: 3.0.1
Show newest version
package eu.lucaventuri.examples;

import eu.lucaventuri.fibry.ActorSystem;
import eu.lucaventuri.fibry.ActorUtils;
import eu.lucaventuri.fibry.Stereotypes;

import java.io.IOException;

public class HttpExampleMini {
    public static void main(String[] args) throws IOException {
        int port = 18000;

        System.out.println("Fibers V1 available: " + ActorUtils.areFibersV1Available());
        System.out.println("Fibers V2 available: " + ActorUtils.areFibersV2Available());
        System.out.println("Fibers available: " + ActorUtils.areFibersAvailable());
        Stereotypes.def().embeddedHttpServer(port, new Stereotypes.HttpStringWorker("/", ex -> "Hello world from Fibry!"));
        System.out.println("Listening on http://localhost:" + port);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy