Badgen.net: Move to Now v2 and `api/`

Created on 22 Oct 2019  ยท  15Comments  ยท  Source: badgen/badgen.net

And why PRs don't have now activated? For the same reason?

There's no way to have some preview url, e.g. #313 cannot be seen.

I think every endpoint can be moved to the api folder, also use @middyjs or such to plug the badgenServe and etc. Actually I think Middy doesn't support async/await functions, which Now Platform supports and which supports TS out of the box too. Just write your API in TS.

Most helpful comment

@styfle Migration complete! And CD pipeline is working now https://github.com/badgen/badgen.net/commit/50d095b10cf31c1636c2527bf4f037928e497adf#commitcomment-36046247 ๐Ÿ’ƒ

All 15 comments

Badgen stick to Now V1 because of expenses. There's a now-v2.json for deploying to Now V2, the default now.json is for V1.

This repo is under badgen org on github, while the service is deployed with my zeit account. My zeit account is on Now V1 plan, while the badgen account on zeit is V2 free plan. Since the default now.json is for V1, so ๐Ÿคทโ€โ™‚๏ธ

@tunnckoCore For the middleware idea, are you intent to compose badgen service with others? I've think about make badgen-service a standalone package, for creating any badgen-like services with a handler file like endpoints/github.ts.

Badgen stick to Now V1 because of expenses.

Oooh, right. Not cool :D

For the middleware idea, are you intent to compose badgen service with others?

No.

For the middleware idea

Not a middleware idea, just thought you can use middy or such when moving to api/ architecture (now v2). But anyway.

Now App will complain every commit on master and mark it as failed ๐Ÿ˜ข
https://github.com/badgen/badgen.net/commit/a8f71db4ae27a430526c70db886ef3c87eeb9cf8#commitcomment-35641544

Yup, I've seen that too... ;/ Probably use some cache/db for saving on expenses? :D

@styfle @rauchg, what about sponsoring/covering the expenses? :P It's a cool project and deserves it.

@tunnckoCore I guess we can make a better donation promotation, plus the Now V1 model & pricing is pretty nice for a service like Badgen. Badgen serves a stable throughput, fits better in a long running docker container than serverless fn.

@tunnckoCore We are going to get sponsorship from ZEIT ๐ŸŽ‰

Thanks! @styfle

Awww! :heart_eyes_cat: Great! :tada:

Done in #320

Do you need to deploy? Seems that badgen.net is still running v1.

The badgen.net domain is under my account now, I need to transfer it to badgen org. If I do the remove & add operation, there will be noticable down time for two steps:

  1. reconfigure the ns server to new setup (a.zeit-world.org etc), then get it verified with now cli
  2. regenerating https certification

Is there a way to smooth this migration? @styfle

@amio Unfortunately, transferring domains between accounts will likely cause some downtime. I'll forward the feedback to the team so we can create a better process when moving from a personal account to a team.

@amio I was mistaken ๐Ÿ˜…

This feature is available on the domains page ๐ŸŽ‰ https://zeit.co/dashboard/domains

  • Click on the three dots on the right side of the domain
  • Select the "Move" menu item
  • Type in the name of the team in the modal

@styfle Migration complete! And CD pipeline is working now https://github.com/badgen/badgen.net/commit/50d095b10cf31c1636c2527bf4f037928e497adf#commitcomment-36046247 ๐Ÿ’ƒ

Great! <3 Only the readme docs need an update now, about endpoints -> api :)

And also seems like the flat endpoint is not flat :stuck_out_tongue_winking_eye:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bjankord picture bjankord  ยท  3Comments

diomed picture diomed  ยท  3Comments

amio picture amio  ยท  3Comments

tunnckoCore picture tunnckoCore  ยท  3Comments

styfle picture styfle  ยท  5Comments