server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package server provides an HTTP server implementation serving the ToDo app.

Package server provides an HTTP server implementation serving the ToDo app.

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 represents an easy-to-use HTTP server that exposes a REST API.

func New

func New(port uint, app *core.App) *Server

New creates a server that uses the given app instance to handle requests.

func (*Server) Run

func (s *Server) Run() error

Run starts the server. It will serve requests on the configured address until an interrupt signal has been received, e.g. by pressing Ctrl + C.

Jump to

Keyboard shortcuts

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