Publish HTML quickly. https://html.house
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
439 B

  1. package htmlhouse
  2. import (
  3. "github.com/danryan/env"
  4. )
  5. type config struct {
  6. StaticDir string `env:"key=STATIC_DIR default=static"`
  7. // PrivateKey string `env:"key=PRIVATE_KEY require=true"`
  8. // PublicKey string `env:"key=PUBLIC_KEY require=true"`
  9. ServerPort int `env:"key=PORT default=8080"`
  10. }
  11. func newConfig() (*config, error) {
  12. cfg := &config{}
  13. if err := env.Process(cfg); err != nil {
  14. return cfg, err
  15. }
  16. return cfg, nil
  17. }