salusa

module
v0.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2024 License: MIT

README

Salusa

Test Coverage Go Reference

What is Salusa?

Salusa is a group of utilities to speed up web development in go.

Creating a Salusa Project

Before creating a salusa project you must have the go toolchain installed, instructions can be found here. You may also need node and npm to create frontends, they can be installed with the instructions found here.

After you have your environment set up you can install the spice utility with go:

go install github.com/abibby/salusa/spice@latest

Once you have installed spice you can create a new project with the init command:

spice init github.com/abibby/example-app

Once you have the created the app you can run the server with the dev command:

spice dev

After starting the development server you can access the application through you browser at http://localhost:2303.

Project Structure

root
├ app
│ ├ events
│ ├ handlers
│ ├ jobs
│ └ models
├ config
├ database
├ migrations
├ resources
└ routes

App

The app direcoty contains all of the buisness logic of your application. In a new project the only file in this directory is kernel.go which is the core of the application. The kernel manages all of the long running services in you application. You can find more information in the kernel docs

Events

The events directory contains all of the events that you application can emit.

Handlers

handlers contains all of the http handlers in your application. In a standard application they all implement the http.Handler interface. Salusa provides the request.Handler helper for creating APIs that speeds up handling user input and returning json. Documentation can be found here.

Jobs
Models

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL