Skip to content

Commit

Permalink
env-example
Browse files Browse the repository at this point in the history
  • Loading branch information
Giri-Spheron committed Oct 25, 2023
1 parent 4e249bc commit f1cef95
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 21 deletions.
2 changes: 2 additions & 0 deletions Backend/.env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RPC_URL=
PRIVATE_KEY=
2 changes: 1 addition & 1 deletion Backend/Routes/userRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 3 additions & 6 deletions Backend/config/dbConfig.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

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

9 changes: 0 additions & 9 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
// <div>
// <SignupPage />
// </div>
// );
// }

function App() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/SignupPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const SignupPage = () => {
const signupHandle = async () => {
setLoading(true);
try {
const res = await axios.post("http://localhost:4000/user/register", {
const res = await axios.post("http://localhost:4000/user/", {
username: values.username,
email: values.email,
password: values.password,
Expand Down

0 comments on commit f1cef95

Please sign in to comment.