refactor: restructure in entirety

This commit is contained in:
Arkaprabha Chakraborty
2025-12-06 15:31:18 +05:30
parent 28733e22d3
commit 17a2bce744
43 changed files with 854 additions and 1342 deletions

View File

@@ -10,20 +10,22 @@ import (
_ "github.com/joho/godotenv/autoload"
"billit/internal/database"
"io/fs"
)
type Server struct {
port int
db database.Service
db database.Service
assetsFS fs.FS
}
func NewServer() *http.Server {
func NewServer(assetsFS fs.FS) *http.Server {
port, _ := strconv.Atoi(os.Getenv("PORT"))
NewServer := &Server{
port: port,
db: database.New(),
port: port,
db: database.New(),
assetsFS: assetsFS,
}
// Declare Server config