Examples

Complete examples and tutorials to get you started with Squirrel

Basic Server

A simple HTTP server with basic routing and middleware setup.

Basic routing
JSON responses
Logging middleware

REST API

A complete RESTful API with CRUD operations and database integration.

CRUD operations
Database integration
Error handling

Middleware Usage

Advanced middleware patterns including authentication and rate limiting.

Authentication
Rate limiting
Custom middleware

File Upload

Handle file uploads with validation, storage, and serving.

File validation
Secure storage
File serving

Getting Started

Each example includes complete, runnable code that you can copy and modify for your own projects. All examples assume you have Go installed and a basic understanding of Go programming.

Prerequisites:

  • Go 1.19 or later
  • Basic knowledge of Go and HTTP concepts
  • Squirrel framework installed