Let’s Try Goravel, Golang with Laravel Style

I Wayan Aditya Wiguna
2 min readFeb 7, 2024

--

Article Banner

When i was research about golang, found one framework make me interest, this goravel, golang with laravel style code 😂 , for me with experience in laravel for 6 years, this is something interest, if it realy powerful it will be help me to make awesome service with my laravel code style, let’s start to try, first you can see on documentation https://www.goravel.dev/getting-started/installation.html

Start The Installation

// Download framework
git clone https://github.com/goravel/goravel.git && rm -rf goravel/.git*

// Install dependencies
cd goravel && go mod tidy

// Create .env environment configuration file
cp .env.example .env

// Generate application key
go run . artisan key:generate

if your using macos like me you can copy and paste this code, but if you are using windows you can see step by step on their documentation.

Explore The Directory

Goravel App Directory

By this structure i already remembering about laravel but in there with adding GRPC directory, great!

Running Goravel

go run .

or if you are using multiple environment you can run like

go run . --env=./.env.staging

if you are want to this more like laravel, you can use live reload, by the documentation, for using livereload we need use air for air installation i will recommend you to follow this issue https://github.com/cosmtrek/air/issues/135

and this first look, feels like laravel Lol

Goravel Homepage

if you are interest to see about monolith application with go, you can visit the templating documentation on https://www.goravel.dev/the-basics/views.html , but for me i only want to make API with go, and something make me more interest with this framework is on migrations and database seeders i think this is something hard to find outside laravel.

For next articel i want to make CRUD API, stay tune on next article, if you are have something i want to review feel free write in comment section.

--

--

I Wayan Aditya Wiguna
I Wayan Aditya Wiguna

Written by I Wayan Aditya Wiguna

Website Developer at Dinas Komunikasi, Informatika Dan Statistik Provinsi Bali with expertise in NestJS, MySQL, Django and Laravel.

Responses (2)