-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
33 lines (25 loc) · 717 Bytes
/
main.go
File metadata and controls
33 lines (25 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"lightyear/cmd"
"lightyear/pkg/auth"
fileprocess "lightyear/pkg/file-process"
"lightyear/pkg/workflow"
"github.com/gin-gonic/gin"
)
const (
DefaultQuality = 80
ParamErrorQuality = "parameter error: quality can only be between 1-100"
ParamErrorEncoding = "parameter error: encoding can only be avif, heic or web"
InternalServerErr = "Internal Server Error"
SupportedEncodings = "avif, heic, webp"
OriginalImagePathEnv = "ORIGINAL_IMAGE_PATH"
EncodedImagePathEnv = "ENCODED_IMAGE_PATH"
)
func main() {
cmd.InitialApp()
router := gin.Default()
auth.AddRoutersTo(router)
fileprocess.AddRoutersTo(router)
workflow.AddRoutersTo(router)
router.Run(":8080")
}