mirror of
https://github.com/restic/rest-server.git
synced 2025-12-07 09:36:13 -08:00
20 lines
292 B
Go
20 lines
292 B
Go
package main
|
|
|
|
import (
|
|
//"io/ioutil"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
context := NewContext("/tmp/restic")
|
|
|
|
repo, _ := context.Repository("user")
|
|
repo.Init()
|
|
|
|
router := Router{context}
|
|
port := ":8000"
|
|
log.Printf("start server on port %s", port)
|
|
http.ListenAndServe(port, router)
|
|
}
|