parent
8da42184eb
commit
3664286506
@ -1,14 +1,19 @@ |
||||
{ |
||||
runDir = "/tmp/mediocre-blog/run"; |
||||
dataDir = "/tmp/mediocre-blog/data"; |
||||
runDir = "/tmp/mediocre-blog/run"; |
||||
dataDir = "/tmp/mediocre-blog/data"; |
||||
|
||||
powSecret = "ssshhh"; |
||||
mlSMTPAddr = ""; |
||||
mlSMTPAuth = ""; |
||||
mlPublicURL = "http://localhost:4000"; |
||||
listenProto = "tcp"; |
||||
listenAddr = ":4000"; |
||||
powSecret = "ssshhh"; |
||||
mlSMTPAddr = ""; |
||||
mlSMTPAuth = ""; |
||||
mlPublicURL = "http://localhost:4000"; |
||||
listenProto = "tcp"; |
||||
listenAddr = ":4000"; |
||||
|
||||
# If empty then a derived static directory is used |
||||
staticProxyURL = "http://127.0.0.1:4002"; |
||||
# If empty then a derived static directory is used |
||||
staticProxyURL = "http://127.0.0.1:4002"; |
||||
|
||||
# password is "bar". This should definitely be changed for prod. |
||||
apiAuthUsers = { |
||||
"foo" = "$2a$13$0JdWlUfHc.3XimEMpEu1cuu6RodhUvzD9l7iiAqa4YkM3mcFV5Pxi"; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,23 @@ |
||||
package main |
||||
|
||||
import ( |
||||
"bufio" |
||||
"fmt" |
||||
"os" |
||||
"strings" |
||||
|
||||
"github.com/mediocregopher/blog.mediocregopher.com/srv/api" |
||||
) |
||||
|
||||
func main() { |
||||
|
||||
fmt.Fprint(os.Stderr, "Password: ") |
||||
|
||||
line, err := bufio.NewReader(os.Stdin).ReadString('\n') |
||||
|
||||
if err != nil { |
||||
panic(err) |
||||
} |
||||
|
||||
fmt.Println(api.NewPasswordHash(strings.TrimSpace(line))) |
||||
} |
Loading…
Reference in new issue