|
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). |
| 1 | +# Rating System |
2 | 2 |
|
3 |
| -## Getting Started |
| 3 | +Bu repository 18.05.2023 Youtube canlı yayınında gerçekleştirdiğimiz LiveCoding oturumuna aittir. |
4 | 4 |
|
5 |
| -First, run the development server: |
| 5 | +## Gereksinimler |
| 6 | +1. Projeyi çalıştırmak istediğiniz bilgisayarda güncel NodeJS sürümlerinden bir tanesi yüklü olması gerekir. Eğer çalışma ortamınızda NodeJS yüklü değilse linkten kurulumları takip ediniz. |
| 7 | +https://nodejs.org/en |
| 8 | + |
| 9 | +Eğer çalışma ortamınızda NodeJS yüklü ise aşağıdaki gibi versiyon kontrolü yapabilirsiniz. |
6 | 10 |
|
7 | 11 | ```bash
|
8 |
| -npm run dev |
9 |
| -# or |
10 |
| -yarn dev |
11 |
| -# or |
12 |
| -pnpm dev |
| 12 | +node -v |
| 13 | +npm -v |
13 | 14 | ```
|
14 | 15 |
|
15 |
| -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 16 | +2. Proje için bir tane MongoDB database'ine ihtiyacımız bulunmaktadır. Bu noktada iki alternatif sunabiliriz. Eğer bilgisayarınızda Docker kurulu ise Docker üzerinden aşağıdaki komut ile bir database ayağa kaldırabilirsiniz. |
| 17 | + |
| 18 | +```bash |
| 19 | +docker run --name mongodb -d -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=user -e MONGO_INITDB_ROOT_PASSWORD=pass mongodb/mongodb-community-server:latest |
| 20 | +``` |
16 | 21 |
|
17 |
| -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 22 | +Eğer çalışma ortamınızda docker kurulu değilse MongoDB Atlas Cloud platformundan ücretsiz versiyonu kullanarak bir database ayağa kaldırabilirsiniz. |
| 23 | +https://www.mongodb.com/atlas/database |
18 | 24 |
|
19 |
| -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. |
| 25 | +## Hazırlıklar |
20 | 26 |
|
21 |
| -## Learn More |
| 27 | +1. Projeyi forklayın. (Projenin ilk haline ulaşmak için Copy the main branch only seçeneğini tiklememeniz gerekmektedir.) |
| 28 | +2. Forkladığınız projeyi local bilgisayara klonlayın. (Klonlama işlemini tamamladıktan sonra projenin ilk haline ulaşmanız için rating-system-init branch'ine geçiş yapmanız gerekmektedir.) |
| 29 | +3. Aşağıdaki işlemleri tamamlayın. |
22 | 30 |
|
23 |
| -To learn more about Next.js, take a look at the following resources: |
| 31 | +```bash |
| 32 | +cd ./rating-system |
| 33 | +npm install |
| 34 | +``` |
| 35 | + |
| 36 | +4. Projeyi çalıştırmadan önce env bilgilerini ekleyin. |
| 37 | + |
| 38 | +- rating-system klasörü altına .env dosyası oluşturun. |
| 39 | + |
| 40 | +```.env |
| 41 | +DATABASE_URL="mongodb://username:password@db0.example.com,db1.example.com,db2.example.com/database" |
| 42 | +``` |
24 | 43 |
|
25 |
| -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
26 |
| -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 44 | +5. Prisma Generate |
27 | 45 |
|
28 |
| -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
| 46 | +```bash |
| 47 | +npx prisma generate |
| 48 | +``` |
| 49 | + |
| 50 | +6. Prisma Studio |
| 51 | +```bash |
| 52 | +npx prisma studio |
| 53 | +``` |
| 54 | + |
| 55 | +Prisma Studio is up on http://localhost:5555 |
| 56 | + |
| 57 | +7. Yeni bir console açın ve uygulamayı çalıştırın. |
| 58 | +```bash |
| 59 | +npm run dev |
| 60 | +``` |
| 61 | +ready started server on 0.0.0.0:3000, url: http://localhost:3000 |
29 | 62 |
|
30 |
| -## Deploy on Vercel |
| 63 | +## Ek Bilgiler |
31 | 64 |
|
32 |
| -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. |
| 65 | +https://www.youtube.com/watch?v=qiktpsm1dYc |
33 | 66 |
|
34 |
| -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
| 67 | +<iframe width="560" height="315" src="https://www.youtube.com/embed/qiktpsm1dYc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> |
0 commit comments