Difference between revisions of "VT2017 Serverless Architectures Demo"

From air
Jump to navigation Jump to search
Line 10: Line 10:
 
<source lang="bash">
 
<source lang="bash">
 
bx wsk action create hello hello.js --web true
 
bx wsk action create hello hello.js --web true
</source>
 
 
 
<source lang="bash">
 
 
bx wsk api create /hello GET hello
 
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