Closed joelalejandro closed 3 years ago
@spersico The only issue with this is that I'm not sure of a good way of testing it. I was thinking about a script that runs a dummy nextjs app and then another one that runs vercel dev
to test the Vercel-only use case.
Thing is - we'd need to install both as devDependencies, and maybe it feels like too much.
@spersico The only issue with this is that I'm not sure of a good way of testing it. I was thinking about a script that runs a dummy nextjs app and then another one that runs
vercel dev
to test the Vercel-only use case.Thing is - we'd need to install both as devDependencies, and maybe it feels like too much.
well.... as long as they are devDependencies, I don't think that it's THAT much. Maybe it could be set to run only on CI?
I'll make changes in the docs to remove the mentiones to Next.js. That'll go in a separate middleware.
I just want to share my experimentation with this API. Here is the repo https://github.com/isBatak/next-js-json-api-starter It's live here https://next-js-kurier-starter.vercel.app/ I used https://supabase.io/ free plan to get Postgres DB, it was a pretty straightforward solution.
Excellent @isBatak! That covers basic functionality for plain entities without relationships. I discovered some issues with ?include=
queries and I'm working on fixing those.
@spersico The only issue with this is that I'm not sure of a good way of testing it. I was thinking about a script that runs a dummy nextjs app and then another one that runs
vercel dev
to test the Vercel-only use case. Thing is - we'd need to install both as devDependencies, and maybe it feels like too much.well.... as long as they are devDependencies, I don't think that it's THAT much. Maybe it could be set to run only on CI?
Hmm, if we're putting them in devDependencies
, I'd rather run the tests locally as well. Making this available just in CI feels like a DX friction.
@isBatak Latest changes to jsonApiVercel
are available for usage in kurier@1.2.0-alpha2
, in case you want to try them out! In the meantime, this PR is getting merged 🚀
Resolves #282.
Now that we've updated dependencies and released v1.1.0, we can move on with feature development. This PR introduces
jsonApiVercel
, a middleware for exposing a Kurier API as a serverless function.