Skip to content

Commit

Permalink
Added landing page that explains that you can use curl
Browse files Browse the repository at this point in the history
  • Loading branch information
JimTheCactus committed Oct 2, 2024
1 parent 873ec53 commit df3461a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export const createApp = async (
);
}

app.use("/", express.static("static"));

const api = new OpenAPIBackend({
definition: process.env["SPEC_FILE"] ?? "./specs/moddedccapi_20240906.json",
strict: false,
Expand Down
18 changes: 18 additions & 0 deletions static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>cc-api-sandbox</title>
<style>
code {
background-color: lightgray;
color: black;
padding: 0.1em 0.2em 0.1em 0.2em;
}
</style>
</head>
<body>
<h1>cc-api-sandbox</h1>
The API server is running and working correctly! You can use <code>curl -X "&lt;METHOD&gt;" http://127.0.0.1:9000/&lt;api path&gt;</code>
to access the API endpoints.
</body>
</html>

0 comments on commit df3461a

Please sign in to comment.