# Share Code Between Services

**URL:** <https://discourse.sst.dev/t/share-code-between-services/1333>\
**Category:** Chapter Comments\
**Created:** [October 9, 2019, 2:05am UTC](https://discourse.sst.dev/t/share-code-between-services/1333 "2019-10-09T02:05:27Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Aaron](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/aaron/32/885_2.png) [@Aaron](https://discourse.sst.dev/u/Aaron)\
**Post date:** [April 11, 2020, 1:38am UTC](https://discourse.sst.dev/t/share-code-between-services/1333/11 "2020-04-11T01:38:20Z")

</div>

So… this is awkward. After scouring this forum for clues I found a lot of people having the same problem but they seemed to abandon the discussion before getting to any resolution. It wasn’t until I read this comment from @ActivateDza:

> [@Add a Get Note API](https://discourse.sst.dev/t/add-a-get-note-api/132/60):
>
> I am getting the following error. I have checked and checked I cannot see what I did wrong. I can create an event just cant get it. C:\Users\activated\myfitnessbook-app-api\>serverless invoke local --function create --path mocks\get-event.json Serverless: Bundling with Webpack... Time: 620ms Built at: 07/07/2019 9:04:46 PM Asset Size Chunks Chunk Names create.js 10.1 KiB create [emitted] create create.js.map 7.23 KiB create [emitted] create Entrypoint create…

that I finally realized what I was doing wrong.

I’m going to document it here so it can help others in the future.

If you look at the serverless invoke local call above, the function passed in is `create` but the event.json object passed in is the get-event. So in my haste to test all these new apis I was using the up arrow in the terminal to recall the last command and editing the name of the event object but not the function. Once I fixed that all the tests passed.

---

_[View the full topic](https://discourse.sst.dev/t/share-code-between-services/1333)._
