mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
add dockerfile
This commit is contained in:
29
main.go
29
main.go
@ -1,29 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"memos/api"
|
||||
"memos/store"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
func main() {
|
||||
store.InitDBConn()
|
||||
|
||||
r := mux.NewRouter().StrictSlash(true)
|
||||
|
||||
api.RegisterAuthRoutes(r)
|
||||
api.RegisterUserRoutes(r)
|
||||
api.RegisterMemoRoutes(r)
|
||||
api.RegisterQueryRoutes(r)
|
||||
|
||||
spa := api.SPAHandler{
|
||||
StaticPath: "./web/dist",
|
||||
IndexPath: "index.html",
|
||||
}
|
||||
|
||||
r.PathPrefix("/").Handler(spa)
|
||||
|
||||
http.ListenAndServe("localhost:8080", r)
|
||||
}
|
Reference in New Issue
Block a user