Difference between revisions of "VT2017 Serverless Architectures Demo"

From air
Jump to navigation Jump to search
(Created page with "'''Hello.js''' <source lang="javascript" line start="1"> function main(params) { return {payload: 'Hello ' + params.name}; } </source>")
 
Line 1: Line 1:
'''Hello.js'''
+
'''Hello.js:'''
 
<source lang="javascript" line start="1">
 
<source lang="javascript" line start="1">
 
function main(params) {
 
function main(params) {
 
return {payload: 'Hello ' + params.name};
 
return {payload: 'Hello ' + params.name};
 
}
 
}
  +
</source>
  +
  +
Then in your terminal:
  +
  +
<source lang="bash">
  +
bx wsk action create hello hello.js --web true
  +
</source>
  +
  +
  +
<source lang="bash">
  +
bx wsk api create /hello GET hello
 
</source>
 
</source>

Revision as of 09:50, 15 September 2017

Hello.js:

1function main(params) {
2   return {payload: 'Hello ' + params.name};
3}

Then in your terminal:

bx wsk action create hello hello.js --web true


bx wsk api create /hello GET hello