Pastikan Anda telah menginstal:
- Node.js (disarankan versi terbaru LTS)
- Git
- npm
- PostgreSQL
festmed-app/
βββ festmed-backend/ # Folder untuk backend (Express.js)
βββ festmed-frontend/ # Folder untuk frontend (Next.js)
βββ README.md # Panduan ini
- Masuk ke folder backend
cd backend
- Install dependencies
npm install @prisma/client cors dotenv express prisma nodemon
- Jalankan server
nodemon .
- Cek apakah server berjalan
Buka browser atau gunakan Postman untuk mengakses:
http://localhost:1725
- Masuk ke folder frontend
cd ../frontend
- Install dependencies
npm install @chakra-ui/react @emotion/react @emotion/styled @tanstack/react-query axios formik framer-motion next next-themes react react-dom react-icons yup
- Jalankan Next.js
npm run dev
- Buka di browser
http://localhost:3000
-
Buat database kosong dengan nama yang sama (
festmed-backend
)CREATE DATABASE "festmed-backend";
-
Buka file
.env.development
dan pastikan koneksi database sudah sesuaiDATABASE_URL=postgres://postgres:yourpassword@localhost:1725/festmed-backend
(Ganti
yourpassword
dengan password PostgreSQL di komputer Anda) -
Jalankan migrasi Prisma
npx prisma migrate dev
-
Jalankan backend
nodemon .
Sekarang proyek berjalan di lokal. Happy coding! π