Serverless framework v1 - multiple resources in one service

前端 未结 3 1903
清歌不尽
清歌不尽 2021-01-20 14:33

I have two resources, games and players, both have crud functions. Are these supposed to be in the same serverless service? I would like to separate them, but how do I then

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-20 14:59

    A serverless framework projects deploys a single API Gateway. So if you want it to be in different API Gateways you need separate serverless framework projects.

    Depending on the size of the services you are making it can make sense or it might not.

    To merge the two API Gateways higher up you can use API Gateway Custom Domains and proxy the requests based on the path to different API Gateways and stages, keeping one single domain for them all.

提交回复
热议问题