Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vietj/vertx-golo
Vertx + Golo
https://github.com/vietj/vertx-golo
Last synced: 3 months ago
JSON representation
Vertx + Golo
- Host: GitHub
- URL: https://github.com/vietj/vertx-golo
- Owner: vietj
- Created: 2013-01-07T11:37:53.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-11-13T14:56:47.000Z (about 11 years ago)
- Last Synced: 2024-10-03T10:38:36.879Z (3 months ago)
- Language: Java
- Size: 146 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Golo language integration for Vert.x server
# Installation
We suppose that Vert.x 2.0.0 is installed already in $VERTX_HOME
1. Clone or download this build
1. Build project with Maven : `mvn package`
1. Copy to $VERTX_HOME/lib the jars:
1. the produced jar: `vertx-golo-1.0-SNAPSHOT.jar`
1. [golo jar](http://search.maven.org/remotecontent?filepath=org/golo-lang/golo/0-preview1/golo-0-preview1.jar): `golo-0-preview1.jar`
1. [asm jar](http://search.maven.org/remotecontent?filepath=org/ow2/asm/asm/4.1/asm-4.1.jar): `asm-4.1.jar`
1. Declare Golo as a supported language:
1. Open $VERTX_HOME/conf/langs.properties
1. add the line `golo=org.vertx.golo.deploy.impl.golo.GoloVerticleFactory`# Usage
Create a file named `hello.golo` with the content:
module vertx.Hello
import org.vertx.java.core
import org.vertx.golo.VerticleContext
local function adapt = |h| -> asInterfaceInstance(Handler.class, h)
function start = {
let handler = |req| {
req: response(): headers(): put("Content-Type", "text/html; charset=UTF-8")
req: response(): end("GoloGolo from vert.x!
")
}
let server = vertx():
createHttpServer():
requestHandler(adapt(handler)):
listen(8080)
}Run it with Vert.x
vertx run hello.golo
Open your browser on [localhost](http://localhost:8080).
More information on:
1. Golo on [Golo site](http://golo-lang.org)
1. Vert.x on [Vert.x site](http://vertx.io)