Skip to content

Commit

Permalink
deploy karne se pehle
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaadil56 committed Jun 5, 2022
1 parent 574ec82 commit a3d03c3
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies

/node_modules
/.pnp
.pnp.js

Expand All @@ -22,3 +22,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
node_modules
4 changes: 2 additions & 2 deletions backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ app.use("/api/v1", orderRouter);
const paymentRouter = require("./routes/paymentRoutes");
app.use("/api/v1", paymentRouter);

app.use(express.static(path.join(__dirname, "./frontend/build")));
app.use(express.static(path.join(__dirname, "../frontend/build")));

app.get("*", (req, res) => {
res.sendFile(path.resolve(__dirname, "./frontend/build/index.html"));
res.sendFile(path.resolve(__dirname, "../frontend/build/index.html"));
});

// app.get("/", (req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ process.on("uncaughtException", (err) => {
//Config

if (process.env.NODE_ENV !== "PRODUCTION") {
require("dotenv").config({ path: "./config/config.env" });
require("dotenv").config({ path: "backend/config/config.env" });
}

//Connecting Database
Expand Down
99 changes: 78 additions & 21 deletions frontend/package-lock.json

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

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"@material-ui/data-grid": "^4.0.0-alpha.37",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.61",
"@mui/icons-material": "^5.6.2",
"@mui/material": "^5.7.0",
"@mui/icons-material": "^5.8.2",
"@mui/material": "^5.8.2",
"@mui/styles": "^5.6.1",
"@stripe/react-stripe-js": "^1.8.0",
"@stripe/stripe-js": "^1.29.0",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js",
"server": "nodemon server.js ",
"start": "node backend/server.js",
"server": "nodemon backend/server.js ",
"client": "cd .. && cd frontend && npm start",
"dev": "concurrently \"nodemon server.js\" \"npm run client\"",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false && npm install && npm install --prefix frontend && npm run build --prefix frontend"
Expand Down

0 comments on commit a3d03c3

Please sign in to comment.