快速开始

创建一个服务,注册一个 / 根路径接口,端口号默认为8080

package main

import "gitee.com/aurora-engine/aurora"

func main() {
    //创建 实例
    a := aurora.NewAurora()
    //注册接口
    a.Get("/", func() {
        a.Info("hello web")
    })
    //启动服务器
    aurora.Run(a)
}

访问 localhost:8080

切换端口号
aurora:
    server:
        port: 8081
开启TLS
aurora:
  server:
    tls:
     certFile: path
     keyFile: path
最后编辑: kuteng  文档更新时间: 2022-07-29 09:12   作者:kuteng