Files
dbis_core-lite/docs/deployment/start-server.md
2026-02-09 21:51:45 -08:00

1.7 KiB

Starting the Development Server

Quick Start

  1. Start the server:

    npm run dev
    
  2. Wait for startup message:

    DBIS Core Lite server started on port 3000
    Terminal UI: http://localhost:3000
    
  3. Access the terminal:

Troubleshooting

Connection Refused Error

If you see ERR_CONNECTION_REFUSED:

  1. Check if server is running:

    lsof -i :3000
    # or
    netstat -tuln | grep 3000
    
  2. Check for errors in terminal:

    • Look for database connection errors
    • Check configuration validation errors
    • Verify JWT_SECRET is set (minimum 32 characters)
  3. Verify database is running:

    psql -U postgres -d dbis_core -c "SELECT 1;"
    
  4. Check environment variables:

    • Create .env file if needed
    • Ensure DATABASE_URL is correct
    • Ensure JWT_SECRET is at least 32 characters

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: