I’m trying to transition an express node service to using the serverless framework and Google Cloud Functions.
No matter what I tried I kept running into an issue where i was getting this error: Unexpected token : in JSON at position 19
category:
handler: category
events:
- http:
path: category/{id}
method: get
cors: true
After some Google searches I found this issue: https://github.com/serverless/serverless-google-cloudfunctions/issues/78
The fix was doing this instead: - http: category/{id}
Let’s hope I don’t need to change my REST verb or set cors.