verless / verless

A Static Site Generator designed for Markdown-based content with a focus on simplicity and performance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

verless serve: Listen to OS interrupt signal and stop server

dominikbraun opened this issue · comments

At the moment, there's no graceful shutdown for the HTTP server started by verless serve. The correct behavior would be to listen to the OS interrupt signal and perform a graceful shutdown by stopping the server explicitly.

With Go being a systems programming language, this is quite straight forward. Example:

https://github.com/dominikbraun/foodunit/blob/9ecf68161892bb94bbf96614fb7628fd2acf314f/server/server.go#L143:L161

The shutdown should be logged using the out package.