Skip to content

Add server-side GET /contact HTML endpoint#185

Draft
AzadZedan with Copilot wants to merge 2 commits into
mainfrom
copilot/add-contact-page
Draft

Add server-side GET /contact HTML endpoint#185
AzadZedan with Copilot wants to merge 2 commits into
mainfrom
copilot/add-contact-page

Conversation

Copilot AI commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

The Express server lacked a dedicated GET /contact route, relying solely on the React SPA to handle that path.

Changes

  • server/_core/index.ts: Registers app.get("/contact", ...) before the Vite/static middleware, so the route takes precedence over client-side routing in both development and production. Returns a self-contained HTML page with basic styling, a status indicator, and a link to the health endpoint.
app.get("/contact", (req, res) => {
  res.setHeader("Content-Type", "text/html; charset=utf-8");
  res.status(200).send(`
    <!doctype html>
    <html lang="en">
      ...
      <body>
        <h1>Contact</h1>
        <div class="card">
          <p>This is the contact page for the Stampcoin Platform.</p>
          <p>Status: <code>OK</code></p>
          <p>Health check: <a href="/health">/health</a></p>
        </div>
      </body>
    </html>
  `);
});

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: AzadZedan <172204218+AzadZedan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add simple contact page with GET route Add server-side GET /contact HTML endpoint Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants