#!/bin/bash # Quick start script for the network scanner echo "==================================" echo "Network Scanner - Quick Start" echo "==================================" # Check if virtual environment exists if [ ! -d "venv" ]; then echo "Creating virtual environment..." python3 -m venv venv fi # Activate virtual environment echo "Activating virtual environment..." source venv/bin/activate # Install dependencies echo "Installing dependencies..." pip install -q --upgrade pip pip install -q -r requirements.txt # Create .env if it doesn't exist if [ ! -f ".env" ]; then echo "Creating .env file from example..." cp .env.example .env fi # Create logs directory mkdir -p logs echo "" echo "==================================" echo "Setup complete!" echo "==================================" echo "" echo "Starting the server..." echo "API will be available at: http://localhost:8000" echo "API Docs at: http://localhost:8000/docs" echo "" echo "Press Ctrl+C to stop the server" echo "" # Run the server python main.py