Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taichi/siden
tiny web application framework for Java SE 8 on top of undertow.
https://github.com/taichi/siden
Last synced: 3 months ago
JSON representation
tiny web application framework for Java SE 8 on top of undertow.
- Host: GitHub
- URL: https://github.com/taichi/siden
- Owner: taichi
- License: apache-2.0
- Created: 2014-10-05T08:19:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-04T16:29:55.000Z (almost 9 years ago)
- Last Synced: 2024-10-13T01:42:51.261Z (3 months ago)
- Language: Java
- Homepage: https://github.com/taichi/siden
- Size: 488 KB
- Stars: 59
- Watchers: 12
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Siden
tiny web application framework for Java SE 8.Siden focus on writing your application quickly and running server more faster.
## Getting Started
### Write simple java application
```java
import ninja.siden.App;public class Main {
public static void main(String[] args) {
App app = new App();
app.get("/hello", (req, res) -> "Hello world");
app.listen();
}
}
```if you want to more examples, see [example/Main.java](https://github.com/taichi/siden/blob/master/siden-example/src/main/java/example/Main.java).
### Add dependency to your build.gradle
```groovy
apply plugin: 'java'repositories.jcenter()
dependencies {
compile 'ninja.siden:siden-core:0.6.0'
}sourceCompatibility = targetCompatibility = 1.8
```### Run and View
http://localhost:8080/hello
## WebSocket Example
```java
import java.nio.file.Paths;
import ninja.siden.App;public class UseWebsocket {
public static void main(String[] args) {
App app = new App();
app.get("/", (q, s) -> Paths.get("assets/chat.html"));
app.websocket("/ws").onText(
(con, txt) -> con.peers().forEach(c -> c.send(txt)));
app.listen(8181);
}
}
```# License
Apache License, Version 2.0
# Inspired projects
* http://expressjs.com/
* http://www.sinatrarb.com/
* http://www.sparkjava.com/
* http://flask.pocoo.org/# Badges
[![wercker status](https://app.wercker.com/status/de09957e13da7a18ae6cf3fbd67afc68/m "wercker status")](https://app.wercker.com/project/bykey/de09957e13da7a18ae6cf3fbd67afc68)