Initial commit
This commit is contained in:
21
main.go
Normal file
21
main.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package shap_planner_backend
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"shap-planner-backend/handlers"
|
||||
"shap-planner-backend/storage"
|
||||
)
|
||||
|
||||
func main() {
|
||||
err := storage.InitDB("database.db")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
http.HandleFunc("/register", handlers.Register)
|
||||
http.HandleFunc("/login", handlers.Login)
|
||||
|
||||
log.Println("Server läuft auf :8080")
|
||||
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||
}
|
||||
Reference in New Issue
Block a user