Content deleted Content added
removed Category:Programming languages created in the 2010s using HotCat Already listed under Category:Programming languages created in 2011. See WP:DIFFUSE. |
lang=opa |
||
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="
Server.start(Server.http,
{ title: "Hello"
Line 53:
It can be compiled to a stand-alone executable JS file with:
<source lang="bash">
$ opa hello_web.opa
</source>
Running the resulting executable JS file launches the web application:
<source lang="bash">
$ ./hello_web.js
</source>
|