Troubleshooting API
NUS Digital Twin offers a public API for its data, found at nus-digital-twin.com/api/v1. The site makes use of on-demand rendering to serve a live API See Astro’s documentation.
Looking to learn how to use the API? Go to the API Reference.
Common Issues
Section titled “Common Issues”The API returns a plain text response instead of JSON
Section titled “The API returns a plain text response instead of JSON”Ensure that the endpoint file in src/pages/api/v1/*.ts
is excluded from pre-rendering.
export const prerender = false;...