Content deleted Content added
Rescuing 0 sources and tagging 1 as dead.) #IABot (v2.0 |
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
||
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 |access-date=6 September 2011 |archive-url=https://web.archive.org/web/20110925044819/http://www.morganhill.co.uk/cloud/opa-the-cloud-language-test-drive/ |archive-date=25 September 2011 |url-status=dead }}</ref>
<
Server.start(Server.http,
{ title: "Hello"
Line 49:
}
)
</syntaxhighlight>
It can be compiled to a stand-alone executable JS file with:
<
$ opa hello_web.opa
</syntaxhighlight>
Running the resulting executable JS file launches the web application:
<
$ ./hello_web.js
</syntaxhighlight>
== See also ==
|