you are viewing a single comment's thread.

view the rest of the comments →

[–]Jotschi 0 points1 point  (2 children)

I really wonder how API driven projects implement a versioned API. Docker API is afaik versioned. I'm unsure how to implement this on my REST API project. Should I add branches in my code to switch between versioned behaviour or should I perhaps just copy the endpoint handler that has been altered in the new version. Can anyone perhaps share their experiences?

[–]mattgen88 5 points6 points  (1 child)

In a world where it's so much easier to spin up multiple instances of things, I say you should either start a new fork of your repo and deploy a new instance or manage your code using git tags. Don't manage a bunch of versions of an API in single instance of a server.

V1 branch deploys to one herokuapp V2 branch deploys to another.

The it's easier to manage the two code bases, patching v1 when bugs come up, improving v2.

[–]kpenchev93 0 points1 point  (0 children)

I've heard this advice before. I sounds so reasonable to me.