How can I make API routes work with a NextJS stack...
# help
c
How can I make API routes work with a NextJS stack? I have a simple Rest route that accepts a get and post request. Locally it works, but when deployed, I get a HTTP 503. What am I missing?
f
Hey @Chris Visser, by API routes, do you mean the routes inside ur
pages/api
?
c
Yes. I finally found the logs and it seems to be an issue that you're already picking up xD https://github.com/serverless-stack/serverless-stack/issues/1334
Would be happy to help, but I need to figure everything out since I'm quite new to SST. Were you able to do something already?
f
@Chris Visser which version of SST r u on?
c
Copy code
"@serverless-stack/cli": "^0.61.0",
"@serverless-stack/resources": "^0.61.0",
"@sls-next/lambda-at-edge": "^3.7.0-alpha.7",
"aws-cdk-lib": "2.7.0",
"aws-sdk": "^2.1069.0"
f
Hey @Chris Visser, we made some changes to the NextjsSite in v0.63.0 and this issue might be fixed🤞
Can you update and give it a try again?
c
I will give it a try right away 🙂
Its working 🙂 ! Thanks @Frank
f
Awesome!