Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SoberingRealityCheck committed Sep 22, 2024
2 parents 77bb21d + 0a3f143 commit 302ce06
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 4 additions & 2 deletions client/src/pages/Todo/Todo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ function TodoPage()
</Form.Group>
</Form>
<Button variant="success" onClick={addTask}>Add Task</Button>
<br />
<br />
{todoList.map((todo, index) => {
return <div key={index}>
{todo.title}
{todo.completed ? "Done" : "Not Done"}
{todo.title}&nbsp;&nbsp;&nbsp;&nbsp;
{todo.completed ? "Done" : "Not Done"}&nbsp;&nbsp;
<Button onClick={() => done(index)}>complete</Button>
</div>
})}
Expand Down
1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"express": "^4.21.0",
"firebase-admin": "^12.5.0",
"mongodb": "^6.9.0",
"openai": "^4.63.0",
"socket.io": "^4.8.0"
},
"devDependencies": {
Expand Down
12 changes: 11 additions & 1 deletion server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,21 @@ import https from "node:https";
import fs from "node:fs";
import cors from "cors";
import { live } from "./routers/chats";
import OpenAI from "openai";

import { config } from "dotenv";
if (process.env.NODE_ENV !== "production") config();

console.log(process.env.NODE_ENV);

const chat = new OpenAI({
model: "gpt-3.5-turbo",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "What is the meaning of life?" },
],
});

export const app = express();
app.use(express.json());
app.use(cors());
Expand All @@ -24,7 +35,6 @@ if (process.env.NODE_ENV === "production") {
}

app.use("/profile", (await import("./routers/profile")).default);
app.use("/todo", (await import("./routers/todo")).default);
app.use("/chats", (await import("./routers/chats")).default);
app.use("/matches", (await import("./routers/matches")).default);

Expand Down

0 comments on commit 302ce06

Please sign in to comment.