To write a hello world
content app, create the following file structure:
/hello-world [type: "app-1"]
/hello-world/.Inline [type: "sjs-3"]
And put the following content in the .Inline
file:
response.body('hello world')
If you expect the app to show up on a page, but it doesn’t, the bucket
of the /hello-world
file is probably wrong.
To write a hello world
page app, create the following file structure:
/hello-world [type: "app-1"]
/hello-world/.Request [type: "sjs-3"]
/hello-world/.Page
And put the following content in the .Request
file:
response.body('hello world')
response.attrStr('content-type', 'text/html')
The execution time is currently limited in 1sec.
The interpreter is based on Otto, thus shares its limitations:
(?=)
- Lookahead (positive), currently a parsing error(?!)
- Lookahead (backhead), currently a parsing error\1
- // Backreference (\1, \2, \3, …), currently a parsing error\s
only includes [\t\n\f\r ]
, the JavaScript definition also includes
\v
, Unicode “Separator, Space”, etc..Inline
.Main
.Request