Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/harium/marine
- Owner: Harium
- License: lgpl-3.0
- Created: 2017-08-10T16:35:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-02-03T15:49:53.000Z (almost 4 years ago)
- Last Synced: 2024-09-30T09:26:42.642Z (3 months ago)
- Topics: boilerplate, java, sparkjava, sparkjava-framework, web
- Language: Java
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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