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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: