test commit
This commit is contained in:
@@ -27,66 +27,3 @@ Marketplace barang bekas teknologi dengan frontend Vue dan backend Node.js Expre
|
|||||||
- Hapus barang milik sendiri
|
- Hapus barang milik sendiri
|
||||||
- Tombol WhatsApp penjual
|
- Tombol WhatsApp penjual
|
||||||
- Bookmark barang di browser
|
- Bookmark barang di browser
|
||||||
|
|
||||||
## Setup Database
|
|
||||||
|
|
||||||
1. Buka phpMyAdmin.
|
|
||||||
2. Pilih menu Import.
|
|
||||||
3. Import file `database.sql`.
|
|
||||||
4. Pastikan database `secondtech_market` berhasil dibuat.
|
|
||||||
|
|
||||||
## Setup Environment
|
|
||||||
|
|
||||||
Copy `.env.example` menjadi `.env`, lalu sesuaikan koneksi MySQL:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
DB_HOST=localhost
|
|
||||||
DB_PORT=3306
|
|
||||||
DB_USER=root
|
|
||||||
DB_PASSWORD=
|
|
||||||
DB_NAME=secondtech_market
|
|
||||||
JWT_SECRET=ganti_dengan_secret_yang_panjang
|
|
||||||
```
|
|
||||||
|
|
||||||
Jika frontend memakai port Vite default, biarkan:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
VITE_API_URL=http://localhost:5000
|
|
||||||
CLIENT_URL=http://localhost:5173
|
|
||||||
```
|
|
||||||
|
|
||||||
## Cara Menjalankan
|
|
||||||
|
|
||||||
Install dependency:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
Jalankan backend:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev:api
|
|
||||||
```
|
|
||||||
|
|
||||||
Jalankan frontend di terminal lain:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Buka:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
http://localhost:5173
|
|
||||||
```
|
|
||||||
|
|
||||||
## Upload Foto
|
|
||||||
|
|
||||||
Foto yang diupload tersimpan di:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
server/uploads
|
|
||||||
```
|
|
||||||
|
|
||||||
URL foto disimpan di MySQL sebagai path `/uploads/nama-file`.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user