Created
August 22, 2018 16:00
-
-
Save nosequeldeebee/5b2814375abb14caecf0b4182272eae2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
err := godotenv.Load() | |
if err != nil { | |
log.Fatal(err) | |
} | |
// Load API credentials | |
config = oauth1.NewConfig(os.Getenv("APIKEY"), os.Getenv("APISECRET")) | |
token = oauth1.NewToken(os.Getenv("TOKEN"), os.Getenv("TOKENSECRET")) | |
s := &http.Server{ | |
Addr: os.Getenv("PORT"), | |
Handler: makeMuxRouter(), | |
ReadTimeout: 20 * time.Second, | |
WriteTimeout: 120 * time.Second, | |
MaxHeaderBytes: 1 << 20, | |
} | |
if err := s.ListenAndServe(); err != nil { | |
log.Fatal(err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment