Skip to content

Commit fa6af3c

Browse files
app prefix
1 parent a826770 commit fa6af3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/items-app/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ let items: Item[] = [{ id: 1, name: "first" }];
55

66
const PORT = Number(process.env.PORT || 8080);
77
const API_PREFIX = "/v1";
8+
const APP_PREFIX = "/items";
89

910
function json(data: unknown, init: ResponseInit = {}) {
1011
return new Response(JSON.stringify(data), {
@@ -85,7 +86,7 @@ const swaggerHtml = `<!doctype html>
8586
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js"></script>
8687
<script>
8788
window.onload = () => {
88-
window.ui = SwaggerUIBundle({ url: '${API_PREFIX}/openapi.json', dom_id: '#swagger-ui' });
89+
window.ui = SwaggerUIBundle({ url: '${APP_PREFIX}${API_PREFIX}/openapi.json', dom_id: '#swagger-ui' });
8990
};
9091
</script>
9192
</body>

0 commit comments

Comments
 (0)