Skip to content

Commit

Permalink
typescript: some quickfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gauron99 committed Dec 12, 2024
1 parent a27a730 commit 66913b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion typescript/hello/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To run locally
```console
npm install
npm run build
npm run local
npm run start
```

## Testing
Expand Down
8 changes: 3 additions & 5 deletions typescript/hello/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import { Context, StructuredReturn } from 'faas-js-runtime';
* It can be invoked with `func invoke`
* It can be tested with `npm test`
*
* It can be invoked with `func invoke`
* It can be tested with `npm test`
*
* @param {Context} context a context object.
* @param {object} context.body the request body if any
* @param {object} context.query the query string deserialized as an object, if any
Expand All @@ -21,9 +18,10 @@ import { Context, StructuredReturn } from 'faas-js-runtime';
*/
const handle = async (context: Context, body: string): Promise<StructuredReturn> => {
// YOUR CODE HERE
context.log.info(`request recieved`);
context.log.info(`request received`);
context.log.info(body);
return {
body: "Hello Typescript World!",
body: 'Hello Typescript World!',
headers: {
'content-type': 'application/json'
}
Expand Down

0 comments on commit 66913b9

Please sign in to comment.