Opa (programming language): Difference between revisions

Content deleted Content added
Reverted 2 good faith edits by 27.54.181.205 using STiki
Line 43:
The traditional [[Hello world program]], producing a web server that serves a static page with "Hello, web!" as its content, can be written in Opa as:<ref>{{cite web |url=http://www.morganhill.co.uk/cloud/opa-the-cloud-language-test-drive/|title=Opa, the cloud language – a test drive |date=26 July 2011 |publisher=Morgan Hill |author=Alastair Aitken}}</ref>
 
<source lang="chtml5">
Server.start(Server.http,
{ title: "Hello"
Line 52:
 
It can be compiled to a stand-alone executable JS file with:
<source lang="cbash">
opa hello_web.opa
</source>
 
Running the resulting executable JS file launches the web application:
<source lang="cbash">
./hello_web.js
</source>