|
|
|
@ -7,6 +7,7 @@ import ( |
|
|
|
"github.com/aldinokemal/go-whatsapp-web-multidevice/services" |
|
|
|
"github.com/aldinokemal/go-whatsapp-web-multidevice/utils" |
|
|
|
"github.com/gofiber/fiber/v2" |
|
|
|
"github.com/gofiber/fiber/v2/middleware/cors" |
|
|
|
"github.com/gofiber/fiber/v2/middleware/logger" |
|
|
|
"github.com/gofiber/template/html" |
|
|
|
_ "github.com/mattn/go-sqlite3" |
|
|
|
@ -21,6 +22,10 @@ func main() { |
|
|
|
app.Static("/statics", "./statics") |
|
|
|
app.Use(middleware.Recovery()) |
|
|
|
app.Use(logger.New()) |
|
|
|
app.Use(cors.New(cors.Config{ |
|
|
|
AllowOrigins: "*", |
|
|
|
AllowHeaders: "Origin, Content-Type, Accept", |
|
|
|
})) |
|
|
|
|
|
|
|
db := utils.InitWaDB() |
|
|
|
cli := utils.InitWaCLI(db) |
|
|
|
|