From 5851dcf806bb4f3e8bc2dd82f1352e35baa79e4e Mon Sep 17 00:00:00 2001 From: ManDeep Singh Date: Thu, 24 Aug 2023 16:21:21 +0530 Subject: [PATCH 1/9] Update index.js with new frontend url --- backend/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/index.js b/backend/index.js index bff7fc0..feffdd4 100644 --- a/backend/index.js +++ b/backend/index.js @@ -12,7 +12,7 @@ const PORT = process.env.PORT || 5000; app.use( cors({ - origin: ["https://booksby.up.railway.app"], + origin: ["https://booksby.onrender.com"], }) ); @@ -52,4 +52,4 @@ routes(app); app.listen(PORT, () => { console.log("Backend server is running at: " + PORT); -}); \ No newline at end of file +}); From 5677017c75f8505d76a1ed53195a2eeed7de93c4 Mon Sep 17 00:00:00 2001 From: Mandeep Singh Date: Thu, 24 Aug 2023 23:47:12 +0530 Subject: [PATCH 2/9] remove lazy loading of home, login and register components --- frontend/src/App.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/frontend/src/App.js b/frontend/src/App.js index db6f2a6..a16fef8 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -5,12 +5,12 @@ import { removeAllProducts } from "./redux/cartRedux"; import "./components/Styles/app.css"; import LoadingOverlay from "./components/SpinnerOverlay"; import { loginFailure } from "./redux/userRedux"; +import Login from "./pages/Login"; +import Register from "./pages/Register"; +import Home from "./pages/Home"; -const Home = lazy(() => import("./pages/Home")); const Product = lazy(() => import("./pages/Product")); const ProductList = lazy(() => import("./pages/ProductList")); -const Register = lazy(() => import("./pages/Register")); -const Login = lazy(() => import("./pages/Login")); const Cart = lazy(() => import("./pages/Cart")); const Success = lazy(() => import("./pages/Success")); const OrderDetails = lazy(() => import("./pages/OrderDetails")); @@ -99,12 +99,10 @@ const App = () => { } /> - }> - {user ? : } - + : } /> { }> - {user ? : } - + user ? : } /> Date: Mon, 6 Nov 2023 16:01:26 +0530 Subject: [PATCH 3/9] Create node.js.yml --- .github/workflows/node.js.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..eb4d9d5 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test From d8c1cc809b51a1cd593408bec4a923703b7daa91 Mon Sep 17 00:00:00 2001 From: ManDeep Singh Date: Mon, 6 Nov 2023 17:10:53 +0530 Subject: [PATCH 4/9] Update node.js.yml --- .github/workflows/node.js.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index eb4d9d5..fa23947 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,5 +27,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm ci + working-directory: './backend' - run: npm run build --if-present + working-directory: './backend' - run: npm test From 7ae9741c9a810b143436ff27eafe38a560b9ba18 Mon Sep 17 00:00:00 2001 From: ManDeep Singh Date: Mon, 6 Nov 2023 17:16:08 +0530 Subject: [PATCH 5/9] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index fa23947..75a59b2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -13,6 +13,9 @@ jobs: build: runs-on: ubuntu-latest + defaults: + run: + working-directory: ./backend/ strategy: matrix: @@ -26,6 +29,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' + cache-dependency-path: './backend/package-lock.json' - run: npm ci working-directory: './backend' - run: npm run build --if-present From 92f635ac55ec4d14dab481ebeca003ecf235ef91 Mon Sep 17 00:00:00 2001 From: ManDeep Singh Date: Mon, 6 Nov 2023 17:18:12 +0530 Subject: [PATCH 6/9] Update node.js.yml --- .github/workflows/node.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 75a59b2..be4ea65 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,4 +34,3 @@ jobs: working-directory: './backend' - run: npm run build --if-present working-directory: './backend' - - run: npm test From 8c39681b1d8874e239371c302d66b7804e2cfac4 Mon Sep 17 00:00:00 2001 From: ManDeep Singh Date: Mon, 6 Nov 2023 17:30:02 +0530 Subject: [PATCH 7/9] Add status badge README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a9c66e5..4eea9b2 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,12 @@ align="center">
-# BooksBy - A MERN Full Stack E-commerce Project +# BooksBy - A MERN Full Stack E-commerce Project +![example workflow](https://github.com/deepsingh132/booksby/actions/workflows/node.js.yml/badge.svg) +[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/main/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request) - [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/main/LICENSE) ![downloads](https://img.shields.io/github/downloads/deepsingh132/booksby/total) + Welcome to the readme for the MERN (MongoDB, Express, React, Node.js) full-stack e-commerce project named BooksBy (stemmed from BooksBuy pronounced Books-Bee). This project is focused on developing an e-commerce website that specializes in selling books based on students' schools, colleges, and other institutions. The website provides a comprehensive search functionality that allows users to find books by their titles, and also displays relevant school information and the books used in the school's curriculum, if applicable. @@ -334,4 +336,4 @@ This MERN full-stack e-commerce project is licensed under the [MIT License](http If you have any questions or suggestions regarding the project, please feel free to reach out to me at [mandeeparora132@gmail.com](mailto:email@example.com). -Thank you for your interest in the MERN full stack e-commerce project - **BooksBy**! I hope this platform proves to be a valuable resource for students and educational institutions alike. \ No newline at end of file +Thank you for your interest in the MERN full stack e-commerce project - **BooksBy**! I hope this platform proves to be a valuable resource for students and educational institutions alike. From a04e78bc0ecca718b52a0706a89581d125569494 Mon Sep 17 00:00:00 2001 From: ManDeep Singh Date: Mon, 18 Dec 2023 17:13:15 +0530 Subject: [PATCH 8/9] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4eea9b2..85f6fe2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ -
+
+ +desktop-home +
+ +
From 81df4ab69e83b96c144142186719f21f90f2628c Mon Sep 17 00:00:00 2001 From: ManDeep Singh Date: Mon, 18 Dec 2023 17:14:13 +0530 Subject: [PATCH 9/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85f6fe2..e27fdd7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@
-# BooksBy - A MERN Full Stack E-commerce Project +# BooksBy - A MERN Full Stack E-commerce Platform ![example workflow](https://github.com/deepsingh132/booksby/actions/workflows/node.js.yml/badge.svg) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/main/LICENSE)