Examples
This directory contains practical examples demonstrating how to use Andromeda's APIs and features. Each example is a complete, runnable TypeScript file that showcases specific functionality.
Available Examples
🗃️ Data & Storage
- SQLite Examples - Database operations, CRUD, analytics, and best practices
- Web Storage Examples - localStorage and sessionStorage for client-side data persistence
- Performance Monitoring - Measuring execution time and performance metrics
🎯 Basic Examples
- FizzBuzz Example - Basic console output and control flow
Getting Started
Each example includes:
- 📝 Complete code samples ready to run
- 🔍 Detailed explanations of concepts and APIs
- ⚡ Best practices and optimization tips
- 🛠️ Real-world use cases and patterns
Running Examples
All examples are designed to run directly with Andromeda:
# Save any example code to a .ts file
andromeda run example.ts
# Or run with verbose output for debugging
andromeda run --verbose example.ts
Example Categories
Beginner Examples
Perfect for learning the basics:
- Console API for debugging and logging
- File System for basic I/O operations
- Basic Canvas drawing
Intermediate Examples
Building more complex functionality:
- Web Storage for data persistence
- Fetch API for network communication
- Performance monitoring and optimization
Advanced Examples
Production-ready patterns:
- SQLite database integration
- Crypto API for security
- Complex Canvas graphics and animations
See Also
- API Reference - Complete API documentation
- Quick Start - Get started quickly
- CLI Reference - Command-line usage