You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by "Luke-Roy-IBM (via GitHub)" <gi...@apache.org> on 2023/03/10 12:33:57 UTC

[GitHub] [openwhisk-runtime-nodejs] Luke-Roy-IBM commented on pull request #233: Add functionality to install modules during init

Luke-Roy-IBM commented on PR #233:
URL: https://github.com/apache/openwhisk-runtime-nodejs/pull/233#issuecomment-1463742009

   Simple example that shows how the new functionality works
   
   `index.js`
   ```javascript
   function main(args) {
   	const oneLinerJoke = require('./one-liner-joke');
   	let getRandomJoke = oneLinerJoke.getRandomJoke();
   
   	return {
           	body: getRandomJoke.body
       	}
   }
   
   
   module.exports.main = main;
   ```
   `package.json`
   ```json
   {
   	"name": "my-action",
   	"main": "index.js",
   	"dependencies" : {
   		"one-liner-joke" : "1.2.2"
    	}
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org