- Install OPA: http://opalang.org
- Compile:
opa opa_hello.opa - Run:
./opa_hello.exe
Created
October 10, 2011 13:07
-
-
Save cedricss/1275272 to your computer and use it in GitHub Desktop.
Hello world in OPA, with raw text versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| hello = <h1>Hello world</h1>> | |
| server = simple_server(parser | |
| | "/rawhtml" -> Resource.raw_text(Xhtml.to_string(hello)) | |
| | "/raw" -> Resource.raw_text("Hello world") | |
| | "/" -> Resource.html("Hello world",hello) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment