Google Cloud Functions and Serverless Path Parameters

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

handler: category
- http:
path: category/{id}
method: get
cors: true

After some Google searches I found this issue:

The fix was doing this instead:  - http: category/{id}

Let’s hope I don’t need to change my REST verb or set cors.

Leave a comment

Leave a Reply

%d bloggers like this: