mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
37 lines
1.2 KiB
Go
37 lines
1.2 KiB
Go
package main
|
|
|
|
import (
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/common"
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/routes/file"
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/routes/project"
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/routes/simulation"
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/routes/simulationmodel"
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/routes/simulator"
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/routes/user"
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/routes/visualization"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func main() {
|
|
// Testing
|
|
db := common.InitDB()
|
|
common.MigrateModels(db)
|
|
defer db.Close()
|
|
|
|
r := gin.Default()
|
|
|
|
api := r.Group("/api")
|
|
user.UsersRegister(api.Group("/users"))
|
|
file.FilesRegister(api.Group("/files"))
|
|
project.ProjectsRegister(api.Group("/projects"))
|
|
simulation.SimulationsRegister(api.Group("/simulations"))
|
|
simulationmodel.SimulationModelsRegister(api.Group("/models"))
|
|
simulator.SimulatorsRegister(api.Group("/simulators"))
|
|
visualization.VisualizationsRegister(api.Group("/visualizations"))
|
|
|
|
|
|
|
|
|
|
r.Run()
|
|
}
|