server

package
v0.0.0-...-45d5ef5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server wraps a chi router (chi.Mux)

func NewServer

func NewServer(cors *cors.Cors) *Server

NewServer creates a router with routes setup

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(quit chan struct{}, errors chan config.ErrorMessage, port string)

ListenAndServe starts the server

func (*Server) Mux

func (s *Server) Mux() *chi.Mux

Mux returns the chi router

func (*Server) SetupRoutes

func (s *Server) SetupRoutes()

SetupRoutes adds all routes that the server should listen to

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL