Commit 191663d
authored
Disable swagger docs in prod (#1520)
# why
When trying to run the server binary, was seeing `Error: ENOENT: no such
file or directory, open
'C:\Users\Administrator\Desktop\python\stagehand-python-stainless\bin\sea\static\logo.svg'`
# what changed
Only registering swagger docs when NODE_ENV is `developement`
# test plan
Will confirm that this resolves the error
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Disable Swagger UI in production by registering it only when NODE_ENV is
"development". This prevents SEA binary runtime errors caused by missing
static assets (e.g., logo.svg).
<sup>Written for commit 46282a2.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->1 parent 5dad639 commit 191663d
2 files changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
149 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
| |||
0 commit comments