167 lines
2.6 KiB
Markdown
167 lines
2.6 KiB
Markdown
# 🚀 Secure Proxy - Installation Fixes Applied
|
|
|
|
## ✅ What Was Fixed
|
|
|
|
Your installation error has been resolved:
|
|
|
|
```
|
|
Error: SQLITE_CANTOPEN: unable to open database file
|
|
```
|
|
|
|
**Solution:** The database directory is now automatically created.
|
|
|
|
---
|
|
|
|
## 🎯 Quick Start (3 Commands)
|
|
|
|
```bash
|
|
npm install
|
|
npm run init-db
|
|
npm run dev
|
|
```
|
|
|
|
Done! Open: **http://localhost:3000**
|
|
|
|
---
|
|
|
|
## 📋 Detailed Steps
|
|
|
|
### 1. Install Dependencies
|
|
```bash
|
|
npm install
|
|
```
|
|
|
|
Expected output:
|
|
```
|
|
added 274 packages
|
|
```
|
|
|
|
### 2. Initialize Database
|
|
```bash
|
|
npm run init-db
|
|
```
|
|
|
|
Expected output:
|
|
```
|
|
🚀 Initializing database...
|
|
✓ Created directory: ./db
|
|
✓ Database initialized successfully!
|
|
✓ Database location: ./db/services.db
|
|
```
|
|
|
|
### 3. Start Server
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
Expected output:
|
|
```
|
|
[timestamp] [INFO] Server running on port 3000
|
|
```
|
|
|
|
### 4. Open in Browser
|
|
```
|
|
http://localhost:3000
|
|
```
|
|
|
|
---
|
|
|
|
## 🔑 Admin Credentials
|
|
|
|
**Email:** `admin@example.com`
|
|
**Password:** `changeme`
|
|
|
|
Change these in `.env` if needed.
|
|
|
|
---
|
|
|
|
## 📝 Useful Commands
|
|
|
|
| Command | What it does |
|
|
|---------|--------------|
|
|
| `npm run dev` | Start server (auto-reload) |
|
|
| `npm start` | Start server (production) |
|
|
| `npm run init-db` | Initialize database |
|
|
| `npm run seed-db` | Load sample data |
|
|
| `bash verify.sh` | Check setup |
|
|
| `bash test.sh` | Run full test suite |
|
|
|
|
---
|
|
|
|
## 🧪 Verify Installation
|
|
|
|
```bash
|
|
bash verify.sh
|
|
```
|
|
|
|
This checks if everything is set up correctly.
|
|
|
|
---
|
|
|
|
## 🔍 What Was Changed
|
|
|
|
1. **Database initialization** - Now creates `db/` directory automatically
|
|
2. **Session management** - `sessions/` directory auto-created
|
|
3. **Default .env** - Configuration file provided
|
|
4. **Setup scripts** - `setup.sh` for automated setup
|
|
5. **Verification** - `verify.sh` to check installation
|
|
|
|
---
|
|
|
|
## 📚 Documentation
|
|
|
|
- **This file** - Quick start guide
|
|
- `00-START-HERE.md` - Project overview
|
|
- `QUICKSTART.md` - Reference guide
|
|
- `README.md` - Full documentation
|
|
- `FIXES-APPLIED.md` - Technical details of fixes
|
|
|
|
---
|
|
|
|
## ❌ If Something Still Doesn't Work
|
|
|
|
### Clean Reset
|
|
```bash
|
|
rm -rf db/ sessions/ node_modules/
|
|
npm install
|
|
npm run init-db
|
|
npm run dev
|
|
```
|
|
|
|
### Port 3000 Already in Use?
|
|
Edit `.env`:
|
|
```
|
|
PORT=3001
|
|
```
|
|
|
|
Then restart: `npm run dev`
|
|
|
|
### Need Database Reset?
|
|
```bash
|
|
rm db/services.db
|
|
npm run init-db
|
|
```
|
|
|
|
### Check Everything
|
|
```bash
|
|
bash test.sh
|
|
```
|
|
|
|
---
|
|
|
|
## 🎉 Success!
|
|
|
|
If you see:
|
|
```
|
|
🚀 Initializing database...
|
|
✓ Database initialized successfully!
|
|
```
|
|
|
|
Everything is working! 🎊
|
|
|
|
Open http://localhost:3000 and enjoy!
|
|
|
|
---
|
|
|
|
**Questions?** Check the documentation files or run `bash test.sh`
|