Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/src/index.ts
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;

Check failure on line 3 in api/src/index.ts

View workflow job for this annotation

GitHub Actions / Optimized Production Build

Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
app.listen(port, () => console.log(`API listening on :${port}`));
14 changes: 14 additions & 0 deletions api/src/server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import express from "express";

Check failure on line 1 in api/src/server.ts

View workflow job for this annotation

GitHub Actions / Optimized Production Build

Could not find a declaration file for module 'express'. '/home/runner/work/CyberAi/CyberAi/node_modules/express/index.js' implicitly has an 'any' type.

const app = express();

app.get("/contracts", (_req, res) => {

Check failure on line 5 in api/src/server.ts

View workflow job for this annotation

GitHub Actions / Optimized Production Build

Parameter 'res' implicitly has an 'any' type.

Check failure on line 5 in api/src/server.ts

View workflow job for this annotation

GitHub Actions / Optimized Production Build

Parameter '_req' implicitly has an 'any' type.
// minimal placeholder that returns an empty array
res.json([]);
});

app.get("/health", (_req, res) => {

Check failure on line 10 in api/src/server.ts

View workflow job for this annotation

GitHub Actions / Optimized Production Build

Parameter 'res' implicitly has an 'any' type.

Check failure on line 10 in api/src/server.ts

View workflow job for this annotation

GitHub Actions / Optimized Production Build

Parameter '_req' implicitly has an 'any' type.
res.json({ status: "ok" });
});

export { app };
9 changes: 9 additions & 0 deletions app/src/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";

Check failure on line 1 in app/src/main.tsx

View workflow job for this annotation

GitHub Actions / Optimized Production Build

Cannot find module 'react' or its corresponding type declarations.
import { createRoot } from "react-dom/client";

Check failure on line 2 in app/src/main.tsx

View workflow job for this annotation

GitHub Actions / Optimized Production Build

Cannot find module 'react-dom/client' or its corresponding type declarations.
import { AppRouter } from "./router";

createRoot(document.getElementById("root")!).render(
<React.StrictMode>

Check failure on line 6 in app/src/main.tsx

View workflow job for this annotation

GitHub Actions / Optimized Production Build

This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed.
<AppRouter />
</React.StrictMode>
);
Comment on lines +1 to +9
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tsconfig.json does not include app/src/**/*.tsx in its include array, and has no "jsx" compiler option set. Running npm run typecheck will not type-check these new files, and npm run build (tsc) will not compile them. The tsconfig needs both "jsx": "react-jsx" in compilerOptions and "app/src/**/*" in the include array for these files to be properly compiled.

Copilot uses AI. Check for mistakes.
5 changes: 5 additions & 0 deletions app/src/router.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from "react";

Check failure on line 1 in app/src/router.tsx

View workflow job for this annotation

GitHub Actions / Optimized Production Build

Cannot find module 'react' or its corresponding type declarations.

export function AppRouter() {
return <div>CyberAi</div>;
}
Loading
Loading