diff --git a/Backend/.env-example b/Backend/.env-example new file mode 100644 index 0000000..b39b0bd --- /dev/null +++ b/Backend/.env-example @@ -0,0 +1,2 @@ +RPC_URL= +PRIVATE_KEY= \ No newline at end of file diff --git a/Backend/Routes/userRouter.js b/Backend/Routes/userRouter.js index 31763bb..2b3efa9 100644 --- a/Backend/Routes/userRouter.js +++ b/Backend/Routes/userRouter.js @@ -3,5 +3,5 @@ const Router=express.Router(); const userService=require('../Services/userService'); Router.post('/login',userService.userLogin) -Router.post('/register',userService.userSignup) +Router.post('/',userService.userSignup) module.exports=Router \ No newline at end of file diff --git a/Backend/config/dbConfig.js b/Backend/config/dbConfig.js index 585e451..c5e488c 100644 --- a/Backend/config/dbConfig.js +++ b/Backend/config/dbConfig.js @@ -1,15 +1,12 @@ const env = require("dotenv").config(); - +require("dotenv").config(); const ethers = require("ethers"); const tableland = require("@tableland/sdk"); // Set up the provider and wallet using your private key. -let provider = new ethers.providers.JsonRpcProvider( - "https://capable-winter-paper.matic-testnet.quiknode.pro/152107c19beb0243104885340d25c00808394af7/" -); -let privateKey = - "0x522c6ab985d1f22f3bf1f918ef1e19cd52e986fa91bfe8c18208d20a00ecbbde"; // Your private key +let provider = new ethers.providers.JsonRpcProvider(process.env.RPC_URL); +let privateKey = process.env.PRIVATE_KEY; // Your private key let wallet = new ethers.Wallet(privateKey, provider); // Connect the wallet to the provider. diff --git a/package-lock.json b/package-lock.json index 4d1b484..c4f19fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16662,16 +16662,16 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=14.17" + "node": ">=4.2.0" } }, "node_modules/unbox-primitive": { diff --git a/src/App.js b/src/App.js index 7f4d976..f151e81 100644 --- a/src/App.js +++ b/src/App.js @@ -4,15 +4,6 @@ import "react-toastify/dist/ReactToastify.css"; import { ToastContainer } from "react-toastify"; import SignupPage from "./Pages/SignupPage"; import { BrowserRouter, Route, Routes } from "react-router-dom"; -import Home from "./Pages/Home"; - -// function App() { -// return ( -//