2023-10-02 02:45:41 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-01-25 17:58:55 +01:00
|
|
|
"git.gnous.eu/gnouseu/plakken/internal/config"
|
|
|
|
"git.gnous.eu/gnouseu/plakken/internal/database"
|
|
|
|
"git.gnous.eu/gnouseu/plakken/internal/httpServer"
|
2023-10-02 02:45:41 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2024-01-25 17:58:55 +01:00
|
|
|
initConfig := config.GetConfig()
|
|
|
|
dbConfig := database.InitDB(initConfig.RedisAddress, initConfig.RedisUser, initConfig.RedisPassword, initConfig.RedisDB)
|
|
|
|
db := database.ConnectDB(dbConfig)
|
|
|
|
|
|
|
|
serverConfig := httpServer.ServerConfig{
|
|
|
|
HTTPServer: httpServer.Config(initConfig.ListenAddress),
|
|
|
|
UrlLength: initConfig.UrlLength,
|
|
|
|
DB: db,
|
2023-10-05 23:18:02 +02:00
|
|
|
}
|
|
|
|
|
2024-01-25 17:58:55 +01:00
|
|
|
serverConfig.Server()
|
2023-10-02 02:45:41 +02:00
|
|
|
}
|