update
This commit is contained in:
parent
b488f8969e
commit
ee82f48ada
|
@ -1 +1,2 @@
|
|||
*.so
|
||||
.build
|
|
@ -7,14 +7,14 @@ import (
|
|||
|
||||
func main() {
|
||||
|
||||
srv, err := aicra.Init("manifest.json")
|
||||
server, err := aicra.New("manifest.json")
|
||||
if err != nil {
|
||||
log.Fatal("cannot load config", err)
|
||||
}
|
||||
|
||||
log.Printf("[Server up] 0.0.0.0:4242\n")
|
||||
|
||||
err = srv.Launch(4242)
|
||||
err = server.Listen(4242)
|
||||
if err != nil {
|
||||
log.Fatalf("*** server failed (%s)\n", err)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.xdrm.io/go/aicra/middleware"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Authentication middleware
|
||||
func Inspect(req http.Request, scope middleware.Scope){
|
||||
scope = append(scope, "user");
|
||||
}
|
Loading…
Reference in New Issue