1.7 KiB
1.7 KiB
Starting the Development Server
Quick Start
-
Start the server:
npm run dev -
Wait for startup message:
DBIS Core Lite server started on port 3000 Terminal UI: http://localhost:3000 -
Access the terminal:
- Open browser: http://localhost:3000
- The IBM 800 Terminal UI will load
Troubleshooting
Connection Refused Error
If you see ERR_CONNECTION_REFUSED:
-
Check if server is running:
lsof -i :3000 # or netstat -tuln | grep 3000 -
Check for errors in terminal:
- Look for database connection errors
- Check configuration validation errors
- Verify JWT_SECRET is set (minimum 32 characters)
-
Verify database is running:
psql -U postgres -d dbis_core -c "SELECT 1;" -
Check environment variables:
- Create
.envfile if needed - Ensure
DATABASE_URLis correct - Ensure
JWT_SECRETis at least 32 characters
- Create
Common Issues
- Database connection failed: Ensure PostgreSQL is running and accessible
- Configuration validation failed: Check JWT_SECRET length (min 32 chars)
- Port already in use: Change PORT in .env or kill existing process
Environment Variables
Create a .env file with:
NODE_ENV=development
PORT=3000
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/dbis_core
JWT_SECRET=your-secret-key-must-be-at-least-32-characters-long
Server Endpoints
Once running:
- Terminal UI: http://localhost:3000
- API: http://localhost:3000/api/v1
- Swagger Docs: http://localhost:3000/api-docs
- Health Check: http://localhost:3000/health
- Metrics: http://localhost:3000/metrics