Open bbourn opened 4 years ago
I'd like to ask for clarification: Are you trying to run this as an API in Next.js, or deploy this as a serverless function on ZEIT Now, which is a server platform by the same authors? We have directions in the README that discuss how to deploy the example to ZEIT Now.
From the logs above it looks like you are trying to access the backend directly after deploying it. This demo is meant to be fronted with a Fanout proxy, so you need a Fanout account. Once logged in, you can set up a domain so that its Origin points to the serverless function that you have deployed to the cloud.
Additionally, you must set the GRIP_URL
environment variable to the publishing endpoint, including your realm ID and realm Key, which are available from the Fanout Control Panel.
You set the environment variable by adding it to now.json
(be sure to replace {realm-id}
and {realm-key}
with your actual values):
"env": {
"GRIP_URL": "https://api.fanout.io/realm/{realm-id}?iss={realm-id}&key=base64:{realm-key}"
}
We are updating the README file with these steps to clarify.
If you need help deploying as an API in Next.js, then we may look in to providing an example.