https://serverless-stack.com/ logo
#guide
Title
# guide
d

Devin

10/07/2021, 9:14 PM
In the guide there’s a pattern for API stack where we make a few stacks. The middle stack is API which we pass along to frontend stack as a config
Copy code
new FrontendStack(app, "frontend", {
    api: apiStack.api, // here
    auth: authStack.auth,
    bucket: storageStack.bucket,
  })
With nextjs do we just move all those handlers up to the
pages/api
and it just works?
j

Jay

10/09/2021, 12:03 AM
With Next.js you mean? They handle APIs within the framework, so that’s how I would do it.
d

Devin

10/09/2021, 2:40 PM
Cool. I’ll move the API from sst into the pages api. Thanks!
3 Views