Categorygithub.com/cinling/cin
repositorypackage
0.1.0
Repository: https://github.com/cinling/cin.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

GitHub tag (latest by date) GitHub go.mod Go version GitHub last commit

cin

简体中文

The http and websocket server's framework.

Inspiration come form yii2.

Getting started

Edit file: main.go

package main

import (
    "github.com/cinling/cin"
    "github.com/cinling/cin/base"
)

func main() {
	config := cin.NewConfig()
    config.ComponentDict = map[string]base.ConfigComponentInterface{
        "ws":      cin.NewConfigWebsocketServer(24600),
        "http":    cin.NewConfigHttpServer(24601).SetSessionName("test"),
        "db":      cin.NewConfigDatabase("mysql", "127.0.0.1", "3306", "cin", "root", "root"),
        "console": cin.NewConfigConsole(),
    }
    cin.App.AddConfig(config)
    cin.App.Run()
}

Run go module to download dependency.

go mod tidy

Compiled code.

go build main.go

Run bin file

  • on windows

./main.exe

  • on linux

./main

Migrations

After Compiled code, run the following command to create migration's file.