Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/harium/marine

A boiler plate web framework over sparkjava
https://github.com/harium/marine

boilerplate java sparkjava sparkjava-framework web

Last synced: 28 days ago
JSON representation

A boiler plate web framework over sparkjava

Awesome Lists containing this project

README

        

# Marine
A web framework built over sparkjava
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.harium.marine/core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.harium.marine/core/)

## Maven
```

com.harium.marine
core
1.1.0

```

## Usage

Example using [dotenv](https://github.com/Harium/dotenv).
```
...
public class Main {

public static void main(String[] args) {
System.out.println("Starting Server");

String host = Env.get("HOST");
System.out.println(host);

Web.port(Integer.parseInt(Env.get("PORT")));
Web.host(host);

// Defining public resources
Web.staticFileLocation("/public");

// Register Web Modules
Web.register(HealthCare.class); // Using class
Web.register(() -> get("/hello", (req, res) -> "Hello World")); // Using instance
// Init Web Modules
Web.init();
}
}
```

## Need more information?
See examples