proxy-oidcv2/LINUX-QUICKSTART.md
2025-12-03 21:38:43 +01:00

102 lines
1.7 KiB
Markdown

# ⚡ FIXED - Linux Quick Start Guide
## Problem Fixed ✅
The database directory creation issue has been resolved. The scripts now automatically create the `db/` directory if it doesn't exist.
## Installation Steps (Linux/Mac)
### Step 1: Install Dependencies
```bash
npm install
```
### Step 2: Initialize Database (NOW WORKS!)
```bash
npm run init-db
```
You should see:
```
🚀 Initializing database...
✓ Created directory: ./db
✓ Database initialized successfully!
✓ Database location: ./db/services.db
```
### Step 3: Start Development Server
```bash
npm run dev
```
Server will start on `http://localhost:3000`
## One-Command Setup
If you want to do everything at once:
```bash
npm install && npm run init-db && npm run dev
```
## Verify Setup
Check if everything is working:
```bash
bash verify.sh
```
This will check:
- ✓ Node.js installed
- ✓ npm installed
- ✓ Directories created
- ✓ Database initialized
- ✓ Key files present
## Access the Application
1. **Home Page**: http://localhost:3000
2. **Admin Panel**: http://localhost:3000/admin
3. **API**: http://localhost:3000/api/services
## Admin Credentials (Default)
Email: `admin@example.com`
Password: `changeme`
(Can be changed in `.env` file)
## Troubleshooting
### Still getting SQLITE_CANTOPEN?
Run these commands to clean and restart:
```bash
rm -rf db/
rm -rf sessions/
npm run init-db
npm run dev
```
### Port 3000 already in use?
Change the port in `.env`:
```
PORT=3001
```
Then restart: `npm run dev`
### Need more help?
Read these files:
- `00-START-HERE.md` - Overview
- `QUICKSTART.md` - Quick reference
- `README.md` - Full documentation
---
**Everything should work now!** 🚀