Skip to content

Commit

Permalink
feat: server pkg (#785)
Browse files Browse the repository at this point in the history
- Expose server-related interface information
  • Loading branch information
huaxiabuluo authored Apr 1, 2024
1 parent 10b595c commit 53ba380
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server-v5/api/studio/etc/studio-api.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Name: studio-api
Host: 0.0.0.0
Port: 7001
Timeout: 10000
Timeout: 30000
Auth:
TokenName: "studio_token"
TokenSecret: "login_secret"
TokenMaxAge: 259200
TokenMaxAge: 86400
19 changes: 19 additions & 0 deletions server-v5/api/studio/pkg/server/server.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package server

import (
"github.com/vesoft-inc/nebula-studio/server-v5/api/studio/internal/config"
"github.com/vesoft-inc/nebula-studio/server-v5/api/studio/internal/handler"
"github.com/vesoft-inc/nebula-studio/server-v5/api/studio/internal/svc"
"github.com/zeromicro/go-zero/rest"
)

type (
ServiceContext = svc.ServiceContext
Config = config.Config
)

var NewServiceContext = svc.NewServiceContext

func RegisterHandlers(server *rest.Server, studioSvcCtx *svc.ServiceContext) {
handler.RegisterHandlers(server, studioSvcCtx)
}

0 comments on commit 53ba380

Please sign in to comment.