Functionally done!
This commit is contained in:
parent
426500df45
commit
7bcdd2dd80
10 changed files with 219 additions and 33 deletions
|
|
@ -11,14 +11,20 @@ import (
|
|||
func main() {
|
||||
privateKeyPath := os.Getenv("CCCLIP_PRIVATE_KEY")
|
||||
publicKeyPath := os.Getenv("CCCLIP_PUBLIC_KEY")
|
||||
databaseLocation := os.Getenv("CCCLIP_DATABASE_LOCATION")
|
||||
port := os.Getenv("CCCLIP_PORT")
|
||||
|
||||
if publicKeyPath == "" || privateKeyPath == "" {
|
||||
log.Fatalf("both public and privae keys must be provided")
|
||||
log.Fatalf("database location and public and privae keys must be provided")
|
||||
}
|
||||
|
||||
config.Default.PrivateKeyPath = privateKeyPath
|
||||
config.Default.PublicKeyPath = publicKeyPath
|
||||
config.Default.DatabaseLocation = databaseLocation
|
||||
|
||||
port := "8080"
|
||||
if port == "" {
|
||||
port = "8080"
|
||||
}
|
||||
log.Printf("Serving on port %s", port)
|
||||
s := server.New(":" + port)
|
||||
log.Fatal(s.ListenAndServe())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue