Getting Started

Learn how to install and set up Squirrel Framework in your Go project.

Prerequisites

Go 1.22+Git

Installation

Install Squirrel Framework using Go modules:

Terminal
go get github.com/useranonymous001/squirrel

Your First Server

Create a simple HTTP server with Squirrel Framework:

package main

import "github.com/useranonymous001/squirrel"

func main() {
    // Create a new server instance
    server := SpawnServer()
    
    // Define a simple route
    server.Get("/", func(req *Request, res *Response) {
        res.Write("Hello, World!")
        res.Send()
    })
    
    // Start the server
    server.Listen(":8080")
}

Running Your Server

Save your code to main.go and run:

go run main.go

Your server will start on http://localhost:8080

Next Steps