Login and main router with jwt tokens

This commit is contained in:
SowinskiBraeden committed 2021-10-07 22:21:47 -07:00
1 parent 7049abf5d8
commit 0a357a7c2b
6 files changed
+219 -26

No files matched your search

+5 -5
View File
@@ -1,19 +1,19 @@
package main
import (
"school-management/database"
"school-management/routes"
"github.com/gofiber/fiber/v2"
"go.mongodb.org/mongo-driver/mongo"
"github.com/gofiber/fiber/v2/middleware/cors"
)
var studentCollection *mongo.Collection = database.OpenCollection(database.Client, "students")
func main() {
app := fiber.New()
app.Use(cors.New(cors.Config{
AllowCredentials: true,
}))
routes.Setup(app)
app.Listen(":8000")