cic-dw/cmd/server.go
Mohammed Sohail 7bda44c169
add: (feat) individual token stats
- volume chart
- token holders
- token tx count

* minor refactors
2022-05-23 15:41:24 +03:00

27 lines
624 B
Go

package main
import (
"cic-dw/internal/dashboard"
"cic-dw/internal/public"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)
func initHTTPServer() *echo.Echo {
server := echo.New()
server.HideBanner = true
// TODO: Remove after stable release
server.Debug = true
server.Use(middleware.CORSWithConfig(middleware.CORSConfig{
AllowOrigins: conf.Server.Cors,
AllowCredentials: true,
MaxAge: 600,
}))
dashboard.InitDashboardApi(server, db, preparedQueries.dashboard)
public.InitPublicApi(server, db, batchBalance, cicnetClient, preparedQueries.public)
return server
}