Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow up to #9281. The functionality added in #9248 depends on the `redwood.toml` file. This file doesn't exist in serverless environments. A quick note on the implementation. I could've done this: ```js let config try { config = getConfig() } catch (e) { if (e.message !== `Could not find a "redwood.toml" file, are you sure you're in a Redwood project?`) { throw e } } // ... ``` But that seemed more brittle because it depends on the error message. Lastly, `getConfig` merges defaults with the raw config, so I don't think the `api?.port` is necessary.
- Loading branch information