Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/warmuuh/jemini

gemini protocol for jetty and spring
https://github.com/warmuuh/jemini

Last synced: about 1 month ago
JSON representation

gemini protocol for jetty and spring

Awesome Lists containing this project

README

        

# jemini
gemini protocol server on top of jetty.

# Features

* integration with jetty & spring boot
* supports all the goodies of normal spring boot webapp
* implicit input handling with `@GmiInput` parameter annotation
* dual-protocol: can serve both `gemini://` and `https://` at the same time, translating gemtext to html
* auto-redirect http to https
* input handling in both `gemini://` and `https://`, transparent to application
* client certificates for both `gemini://` and `https://`
* session-logic based on client-certificates, both for `gemini://` and `https://`
* css-support for html-rendered gemtext

# Getting Started

## generate certificate
```
keytool -genkey -alias -keyalg RSA -keypass -storepass -keystore keystore.jks
```

```yaml
# application.yaml
gemini:
server:
key-password: storepassword
keystore-password: storepassword
keystore: file:keystore.jks
dualHttp: true
css-for-http: /classless-tiny.css
```

```xml


com.github.warmuuh.jemini
jemini-spring-boot-starter
1.0-SNAPSHOT


org.springframework.boot
spring-boot-starter-freemarker

```

then you can use spring mvc as usual
```java
@Controller
public class HelloWorldController {

@GetMapping("/test")
public String test() {
return "index";
}

@GetMapping("/test1")
@ResponseBody
public String test1() {
return "Hello World. this is a dynamic page: " + Math.random();
}
}
```