|
|
@ -44,7 +44,7 @@ func run(ctx context.Context, w io.Writer, args []string) error {
|
|
|
|
|
|
|
|
|
|
|
|
// DEPENDENCY INJECTION FOR HANDLERS
|
|
|
|
// DEPENDENCY INJECTION FOR HANDLERS
|
|
|
|
// Setup Logging
|
|
|
|
// Setup Logging
|
|
|
|
logger := logging.InitLogging(*logLevel, false)
|
|
|
|
logger := logging.InitLogging(*logLevel, w, false)
|
|
|
|
// Setup DB Connection Pool
|
|
|
|
// Setup DB Connection Pool
|
|
|
|
db, err := rdb.OpenSqlite3DB(*dbPath)
|
|
|
|
db, err := rdb.OpenSqlite3DB(*dbPath)
|
|
|
|
|
|
|
|
|
|
|
@ -101,7 +101,6 @@ func run(ctx context.Context, w io.Writer, args []string) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// START SERVING REQUESTS
|
|
|
|
// START SERVING REQUESTS
|
|
|
|
slog.Debug("Herp dirp!")
|
|
|
|
|
|
|
|
slog.Info(fmt.Sprintf("Listening on http://%s:%s", *addr, *port))
|
|
|
|
slog.Info(fmt.Sprintf("Listening on http://%s:%s", *addr, *port))
|
|
|
|
//log.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%s", *addr, *port), server))
|
|
|
|
//log.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%s", *addr, *port), server))
|
|
|
|
// there is no log.Fatal equivalent. This is an approximation of the behavior
|
|
|
|
// there is no log.Fatal equivalent. This is an approximation of the behavior
|
|
|
|