Skip to content

An amaya framework module that implements a web application and its infrastructure.

License

Notifications You must be signed in to change notification settings

AmayaFramework/amaya-core

Repository files navigation

amaya-core maven-central

An amaya framework module that implements a web application and its infrastructure.

Getting Started

To install it, you will need:

  • Java 11+
  • Maven/Gradle
  • Any amaya-server implementation (for example, amaya-jetty)

Installing

Gradle dependency

dependencies {
   implementation group: 'io.github.amayaframework', name: 'amaya-core', version: '2.0.0'
}

Maven dependency

<dependency>
    <groupId>io.github.amayaframework</groupId>
    <artifactId>amaya-core</artifactId>
    <version>2.0.0</version>
</dependency>

Usage example

Hello, world

Gradle dependency section:

dependencies {
    implementation group: 'io.github.amayaframework', name: 'amaya-core', version: '2.0.0'
    implementation group: 'io.github.amayaframework', name: 'amaya-jetty', version: '1.0.0'
}

Java code:

import io.github.amayaframework.core.WebBuilders;
import io.github.amayaframework.jetty.JettyServerFactory;

public class Main {
    public static void main(String[] args) throws Throwable {
        var builder = WebBuilders.create();
        var app = builder
                .setServerFactory(new JettyServerFactory())
                .build();
        app.bind(8080);
        app.run(ctx -> ctx.getResponse().getWriter().write("Hello, I am Amaya"));
    }
}

Built With

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache License Version 2.0 - see the LICENSE file for details

Acknowledgments

Thanks to everyone who was interested in this framework, gave advices and suggested ideas.