mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00

- revise data model to new version (without project) - adapt database test to new data model - use separate folder for all endpoint defs and functions to avoid circular deps - add all API endpoints and skeletons for their implementation
31 lines
724 B
Go
31 lines
724 B
Go
package main
|
|
|
|
import (
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/endpoints"
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/common"
|
|
)
|
|
|
|
func main() {
|
|
// Testing
|
|
db := common.InitDB()
|
|
common.MigrateModels(db)
|
|
defer db.Close()
|
|
|
|
r := gin.Default()
|
|
|
|
api := r.Group("/api")
|
|
endpoints.UsersRegister(api.Group("/users"))
|
|
//file.FilesRegister(api.Group("/files"))
|
|
//project.ProjectsRegister(api.Group("/projects"))
|
|
endpoints.SimulationsRegister(api.Group("/simulations"))
|
|
//model.ModelsRegister(api.Group("/simulations"))
|
|
endpoints.SimulatorsRegister(api.Group("/simulators"))
|
|
//visualization.VisualizationsRegister(api.Group("/visualizations"))
|
|
|
|
|
|
|
|
|
|
r.Run()
|
|
}
|