Site icon Golang Libraries, Apps, Golang Jobs and Go Tutorials

A simple, lightweight, and fast full-stack framework for Golang

Functionality:

Notice

There is coverage and CI for both Linux, Mac and Windows environments, but I make no guarantees about the bin version working on Windows. Must be Golang version 1.17 or higher

Installation

As a library

go get github.com/dominic-wassef/ghostly@latest

or if you want to use it as a bin command I will list the exact steps below:

Step 1. Make a workfolder on your Desktop and cd into it

mkdir Ghostly-App
cd Ghostly-App

Step 2. Clone the repository

git clone git@github.com:Dominic-Wassef/ghostly.git

Step 3. cd into directory and build the binary with the Makefile at root level of the ghostly project

cd ghostly
make build

Step 4. cd into the dist directory of the ghostly application and copy it to your Desktop

cd dist
cp ./ghostly ~/Desktop

Usage

Once above steps have been followed, you can show all ghostly command by going to your Desktop and run:

./ghostly

Making a new project:

./ghostly new $("PROJECT-NAME")

Then cd into your newly made Go project:

cd $("PROJECT-NAME")

Run the project by using the makefile in your new project directory

make start

Here are the types for the Ghostly Framework

type Ghostly struct {
	AppName       string
	Debug         bool
	Version       string
	ErrorLog      *log.Logger
	InfoLog       *log.Logger
	RootPath      string
	Routes        *chi.Mux
	Render        *render.Render
	Session       *scs.SessionManager
	DB            Database
	JetViews      *jet.Set
	config        config
	EncryptionKey string
	Cache         cache.Cache
	Scheduler     *cron.Cron
	Mail          mailer.Mail
	Server        Server
}

Below types are for Server and Config:

type Server struct {
	ServerName string
	Port       string
	Secure     bool
	URL        string
}

type config struct {
	port        string
	renderer    string
	cookie      cookieConfig
	sessionType string
	database    databaseConfig
	redis       redisConfig
}

For complete documentation please refer to the package on: Ghostly Documentation

Who?

The full library ghostly was written by Dominic-Wassef

Exit mobile version