Skip to content

← All questions

Every generated API scenario hits the UI origin — ui and api baseUrl came out identical

Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.

Fresh project from analyze. The starter @api features all fail with HTML where JSON should be, and the reason is in the env file:

yaml
ui:
  baseUrl: http://localhost:3000
api:
  baseUrl: http://localhost:3000

Our API is at /api on the same origin. I expected the /api suffix to be there. It is a Next app; the only Express in the repo is a small socket server in another package.

2 answers

Know the answer?

Wrap commands and output in triple backticks and they will render as a code block.

Checking whether you’re signed in…

Have a different question? Ask it.

Related