24 lines
546 B
Go
24 lines
546 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"git.jamestombleson.com/jtom38/newsbot-portal/apiclient"
|
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/config"
|
|
"git.jamestombleson.com/jtom38/newsbot-portal/internal/handlers"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
cfg := config.New()
|
|
apiClient := apiclient.New(cfg.ServerAddress)
|
|
server := handlers.NewServer(ctx, cfg, apiClient)
|
|
|
|
fmt.Println("The server is online and waiting for requests.")
|
|
fmt.Printf("http://%v:8082\r\n", cfg.ServerAddress)
|
|
|
|
server.Router.Start(":8082")
|
|
}
|