mirror of
https://github.com/renorris/openfsd
synced 2026-03-22 06:25:35 +08:00
23 lines
385 B
Go
23 lines
385 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
"os/signal"
|
|
)
|
|
|
|
func main() {
|
|
ctx, _ := signal.NotifyContext(context.Background(), os.Interrupt)
|
|
|
|
os.Setenv("DATABASE_DRIVER", "sqlite")
|
|
os.Setenv("DATABASE_SOURCE_NAME", "../test.db")
|
|
os.Setenv("FSD_HTTP_SERVICE_ADDRESS", "http://localhost:13618")
|
|
|
|
server, err := NewDefaultServer(ctx)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
server.Run(ctx)
|
|
}
|