mirror of
https://github.com/farcasclaudiu/learn-build-apps-copilot-agent.git
synced 2026-06-29 07:01:32 +03:00
feat: initialize frontend with React and Vite setup
- Added React and Vite configuration files. - Created main entry point for the application. - Included global CSS styles for theming and layout. - Added SVG assets for React and Vite logos.
This commit is contained in:
+1895
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "octofit-tracker-backend",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"dev": "ts-node-dev --respawn --transpile-only src/index.ts",
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"start": "node dist/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^5.2.1",
|
||||
"mongoose": "^9.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/node": "^26.0.0",
|
||||
"ts-node-dev": "^2.0.0",
|
||||
"typescript": "^6.0.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import express from "express";
|
||||
import mongoose from "mongoose";
|
||||
|
||||
const app = express();
|
||||
const port = Number(process.env.PORT) || 8000;
|
||||
const mongoUri = process.env.MONGO_URI || "mongodb://127.0.0.1:27017/octofit_tracker";
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
app.get("/health", (_req, res) => {
|
||||
res.status(200).json({ status: "ok" });
|
||||
});
|
||||
|
||||
const start = async () => {
|
||||
try {
|
||||
await mongoose.connect(mongoUri);
|
||||
app.listen(port, () => {
|
||||
console.log(`OctoFit backend listening on http://localhost:${port}`);
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Failed to start backend:", error);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
void start();
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"module": "Node16",
|
||||
"moduleResolution": "Node16",
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in New Issue
Block a user