-
-
Notifications
You must be signed in to change notification settings - Fork 4
Apply PR review feedback: type safety, tsconfig coverage, dep classification, async cleanup, and missing surface stubs #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
3abf594
69db37f
b3375ec
9be4d44
4f1073e
6ea9b40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import { app } from "./server"; | ||
|
|
||
| const port = Number(process.env.PORT) || 4000; | ||
| app.listen(port, () => console.log(`API listening on :${port}`)); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import express from "express"; | ||
|
|
||
| const app = express(); | ||
|
|
||
| app.get("/contracts", async (_req, res) => { | ||
| // minimal placeholder that returns an empty array | ||
| res.json([]); | ||
| }); | ||
|
|
||
| app.get("/health", (_req, res) => { | ||
| res.json({ status: "ok" }); | ||
| }); | ||
|
|
||
| export { app }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import React from "react"; | ||
| import { createRoot } from "react-dom/client"; | ||
| import { AppRouter } from "./router"; | ||
|
|
||
| createRoot(document.getElementById("root")!).render( | ||
| <React.StrictMode> | ||
| <AppRouter /> | ||
| </React.StrictMode> | ||
| ); | ||
|
Comment on lines
+1
to
+9
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import React from "react"; | ||
|
|
||
| export function AppRouter() { | ||
| return <div>CyberAi</div>; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
/contractsroute handler is markedasyncbut contains noawaitexpressions. This is unnecessary and may generate a TypeScript lint warning. Since there's no asynchronous operation, theasynckeyword should be removed.