Getting Started

This guide will walk you through installing Velora, setting up your first project, and running a simple example. πŸš€

πŸ“¦ Installation

Make sure you have Go v1.22+ installed on your machine. You can check your version using:

go version

Install Velora globally using go install:

go install github.com/aryan-salemababdi/velora@latest

Or add it directly to your project using go get:

go get github.com/aryan-salemababdi/velora

πŸ“‚ Project Setup

Create a new Go project and initialize a module:

mkdir my-velora-app
velora new my-velora-app
cd my-velora-app

πŸ‘‹ Hello Velora

Here’s the simplest example to get started:

package main

import (
	"log"

	"myapp/app"

	velora "github.com/aryan-salemababdi/Velora/app"
)

func main() {
	a := velora.New()

	if err := a.RegisterModule(app.New()); err != nil {
		log.Fatal(err)
	}
	if err := a.Start(":3000"); err != nil {
		log.Fatal(err)
	}
}

Run your application:

go run main.go

Open http://localhost:3000 in your browser, and you should see your first Velora app in action!

πŸš€ Next Steps

Now that your app is running, you can explore:

  • Routing β€” Learn how to define routes and handle requests.
  • Modules β€” Organize your app with Velora’s modular system.
  • Middleware β€” Add custom logic to requests and responses.