We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Fileserver Quiz

Let's go over some of the code that we used for our simple fileserver and make sure we understand the nuts and bolts.

Consider this code from the main() function and answer the questions:

srv := &http.Server{
    Addr:    ":" + port,
    Handler: mux,
}

log.Printf("Serving files from %s on port: %s\n", filepathRoot, port)
log.Fatal(srv.ListenAndServe())