2018-07-20 12:13:52 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2018-09-06 12:47:32 +00:00
|
|
|
"github.com/gin-gonic/gin"
|
2018-08-03 13:17:13 +00:00
|
|
|
"github.com/photoprism/photoprism"
|
2018-07-20 12:13:52 +00:00
|
|
|
)
|
|
|
|
|
2018-08-07 18:17:14 +00:00
|
|
|
func Start(address string, port int, conf *photoprism.Config) {
|
2018-09-13 05:05:13 +00:00
|
|
|
app := gin.Default()
|
2018-07-20 12:13:52 +00:00
|
|
|
|
2018-09-13 05:05:13 +00:00
|
|
|
ConfigureRoutes(app, conf)
|
2018-07-20 12:13:52 +00:00
|
|
|
|
2018-09-13 05:05:13 +00:00
|
|
|
app.Run(fmt.Sprintf("%s:%d", address, port))
|
2018-07-20 12:13:52 +00:00
|
|
|
}
|