{"action":"created","issue":{"url":"https://api.github.com/repos/openfaas/faas-cli/issues/464","repository_url":"https://api.github.com/repos/openfaas/faas-cli","labels_url":"https://api.github.com/repos/openfaas/faas-cli/issues/464/labels{/name}","comments_url":"https://api.github.com/repos/openfaas/faas-cli/issues/464/comments","events_url":"https://api.github.com/repos/openfaas/faas-cli/issues/464/events","html_url":"https://github.com/openfaas/faas-cli/issues/464","id":343589279,"node_id":"MDU6SXNzdWUzNDM1ODkyNzk=","number":464,"title":"Question: Node.js template code sharing between functions","user":{"login":"kobynet","id":618733,"node_id":"MDQ6VXNlcjYxODczMw==","avatar_url":"https://avatars2.githubusercontent.com/u/618733?v=4","gravatar_id":"","url":"https://api.github.com/users/kobynet","html_url":"https://github.com/kobynet","followers_url":"https://api.github.com/users/kobynet/followers","following_url":"https://api.github.com/users/kobynet/following{/other_user}","gists_url":"https://api.github.com/users/kobynet/gists{/gist_id}","starred_url":"https://api.github.com/users/kobynet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobynet/subscriptions","organizations_url":"https://api.github.com/users/kobynet/orgs","repos_url":"https://api.github.com/users/kobynet/repos","events_url":"https://api.github.com/users/kobynet/events{/privacy}","received_events_url":"https://api.github.com/users/kobynet/received_events","type":"User","site_admin":false},"labels":[{"id":580795725,"node_id":"MDU6TGFiZWw1ODA3OTU3MjU=","url":"https://api.github.com/repos/openfaas/faas-cli/labels/question","name":"question","color":"cc317c","default":true},{"id":883509558,"node_id":"MDU6TGFiZWw4ODM1MDk1NTg=","url":"https://api.github.com/repos/openfaas/faas-cli/labels/support","name":"support","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-07-23T11:12:58Z","updated_at":"2018-08-21T11:41:18Z","closed_at":null,"author_association":"NONE","body":"Assume we want to create CRUD rest service using node.js template. Functions share some code (for example bootstrap of the environment. since faas-cli forces me to have single handler.js file, what is the best way to do this without code redundancy ? \r\n\r\n## Expected Behaviour\r\nyml file allows to pick my own handler file\r\n\r\n## Current Behaviour\r\nhandler.js is picked without any other option\r\n\r\n## Possible Solution\r\nNot sure if it kind of overrides the single function single responsibility concept, but being able to pick my own handler file (maybe copying the custom handler (for example create.js/delete.js) file as handler.js in build directory)\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openfaas/faas-cli/issues/comments/414645089","html_url":"https://github.com/openfaas/faas-cli/issues/464#issuecomment-414645089","issue_url":"https://api.github.com/repos/openfaas/faas-cli/issues/464","id":414645089,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDY0NTA4OQ==","user":{"login":"ivanayov","id":4160133,"node_id":"MDQ6VXNlcjQxNjAxMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/4160133?v=4","gravatar_id":"","url":"https://api.github.com/users/ivanayov","html_url":"https://github.com/ivanayov","followers_url":"https://api.github.com/users/ivanayov/followers","following_url":"https://api.github.com/users/ivanayov/following{/other_user}","gists_url":"https://api.github.com/users/ivanayov/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanayov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanayov/subscriptions","organizations_url":"https://api.github.com/users/ivanayov/orgs","repos_url":"https://api.github.com/users/ivanayov/repos","events_url":"https://api.github.com/users/ivanayov/events{/privacy}","received_events_url":"https://api.github.com/users/ivanayov/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T11:41:18Z","updated_at":"2018-08-21T11:41:18Z","author_association":"CONTRIBUTOR","body":"Derek close"}}
{"actor":{"display_login":"ivanayov"}}