|
1 | | -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). |
2 | | - |
3 | | -## Getting Started |
4 | | - |
5 | | -First, run the development server: |
6 | | - |
7 | | -```bash |
| 1 | +# Electronics eCommerce Shop With Admin Dashboard NextJS NodeJS |
| 2 | + |
| 3 | +# Instructions |
| 4 | +1. To run the app you first need to download and install Node.js and npm on your computer. Here is a link to the tutorial that explains how to install them: [https://www.youtube.com/watch?v=4FAtFwKVhn0](https://www.youtube.com/watch?v=4FAtFwKVhn0). Also here is the link where you can download them: [https://nodejs.org/en](https://nodejs.org/en) |
| 5 | +2. When you install Node.js and npm on your computer you need to download and install MySQL on your computer. Here is another link to the tutorial which explains how you can download and install MySQL on your computer: [https://www.youtube.com/watch?v=BxdSUGBs0gM&t=212s](https://www.youtube.com/watch?v=BxdSUGBs0gM&t=212s). Here is a link where you can download MySQL: [https://dev.mysql.com/downloads/installer/](https://dev.mysql.com/downloads/installer/) |
| 6 | +3. This step is optional, but highly recommended if you don't have a database management app. Because HeidiSQL is beginner-friendly and very easy to use than other database management options. Here is a link to the tutorial which explains how to download and install HeidiSQL: [https://www.youtube.com/watch?v=oJ24MyLeiPs](https://www.youtube.com/watch?v=oJ24MyLeiPs) and here is a link where you can download it: [https://www.heidisql.com/](https://www.heidisql.com/) |
| 7 | +4. When you install all the programs you need on your computer you need to download the project. When you download the project, you need to extract it. |
| 8 | +5. After you extract the project you need to open the project folder in your code editor and in the root create a file with the name .env. |
| 9 | +6. You need to put the following code in the .env file and instead of username and password put your MySQL username and password. |
| 10 | +``` |
| 11 | +DATABASE_URL="mysql://username:password@localhost:3306/singitronic_nextjs" |
| 12 | +NEXTAUTH_SECRET=12D16C923BA17672F89B18C1DB22A |
| 13 | +NEXTAUTH_URL=http://localhost:3000 |
| 14 | +``` |
| 15 | +7. After you do it, you need to create another .env file in the server folder and put the same DATABASE_URL you used in the previous .env file: |
| 16 | +``` |
| 17 | +DATABASE_URL="mysql://username:password@localhost:3306/singitronic_nextjs" |
| 18 | +``` |
| 19 | +8. Now you need to open your terminal of choice in the server folder of the project and write: |
| 20 | +``` |
| 21 | +npm install |
| 22 | +``` |
| 23 | +9. Next is to insert demo data. To do it you need to go to the server/utills folder and call insertDemoData.js: |
| 24 | +``` |
| 25 | +cd utills |
| 26 | +node insertDemoData.js |
| 27 | +``` |
| 28 | +10. Now you can go back to the server folder and run the backend: |
| 29 | +``` |
| 30 | +cd .. |
| 31 | +node app.js |
| 32 | +``` |
| 33 | +11. While your backend is running you need to open another terminal(don't stop the backend). In the second terminal, you need to make sure you are in your root project folder and write the following: |
| 34 | +``` |
| 35 | +npm install |
| 36 | +``` |
| 37 | +12. After everything is installed, you need to run the Next.js application: |
| 38 | +``` |
8 | 39 | npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
13 | | -# or |
14 | | -bun dev |
15 | 40 | ``` |
16 | | - |
17 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
18 | | - |
19 | | -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
20 | | - |
21 | | -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. |
22 | | - |
23 | | -## Learn More |
24 | | - |
25 | | -To learn more about Next.js, take a look at the following resources: |
26 | | - |
27 | | -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 | | -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
29 | | - |
30 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
31 | | - |
32 | | -## Deploy on Vercel |
33 | | - |
34 | | -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
35 | | - |
36 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
|
0 commit comments