Skip to content

Commit

Permalink
Some Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik2433 committed May 21, 2024
1 parent 879ea35 commit 7896eb5
Show file tree
Hide file tree
Showing 7 changed files with 176 additions and 77 deletions.
6 changes: 3 additions & 3 deletions client/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function loader(element) {

async function generateQue() {
loader(loding);
const response = await fetch("http://localhost:5000", {
const response = await fetch("https://interview-bot.onrender.com", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -103,7 +103,7 @@ nextButton.addEventListener("click", (e) => {
async function getRemarks() {
for (let i = 0; i < questions.length; i++) {
loader(loding);
const response = await fetch("http://localhost:5000", {
const response = await fetch("https://interview-bot.onrender.com", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -134,7 +134,7 @@ async function getRemarks() {
async function getOptimise() {
for (let i = 0; i < questions.length; i++) {
loader(loding);
const response = await fetch("http://localhost:5000", {
const response = await fetch("https://interview-bot.onrender.com", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ submitbutton.addEventListener("click", (e) => {
console.log("Submit Button Clicked...");
e.preventDefault();
validateAndNavigate();
});
});
87 changes: 86 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": {
"@google/generative-ai": "^0.1.3"
"@google/generative-ai": "^0.1.3",
"node-fetch": "^3.3.2"
}
}
151 changes: 81 additions & 70 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"node-fetch": "^3.3.2",
"nodemon": "^2.0.20"
}
}
3 changes: 2 additions & 1 deletion server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import express from "express";
import * as dotenv from "dotenv";
import cors from "cors";
import { GoogleGenerativeAI } from "@google/generative-ai";
import fetch from 'node-fetch';
import { isCorrect,formatQuestions } from "./functions.js";

dotenv.config();
Expand All @@ -14,7 +15,7 @@ app.use(express.json());

app.get("/", async (req, res) => {
res.status(200).send({
message: "Hello from CodeX ",
message: "Hello World...!!!",
});
});

Expand Down

0 comments on commit 7896eb5

Please sign in to comment.