23 lines
482 B
Go
23 lines
482 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
"rest_api/models"
|
|
"rest_api/router"
|
|
)
|
|
|
|
func main() {
|
|
config := models.Config{
|
|
Token: "Alt",
|
|
UploadDir: "./uploads", // Папка для сохранения файлов
|
|
MaxSizeUpload: 100 * 1024 * 1024, // Max размер файла
|
|
TaskDir: "extra",
|
|
}
|
|
|
|
router := router.NewRouter(config).SetupRoutes()
|
|
|
|
log.Println("Сервер запущен на :8080")
|
|
http.ListenAndServe(":8080", router)
|
|
|
|
}
|