func New(db countrydb.DB) (*Server, error) {
	indexTpl, err := template.ParseFiles("templates/index.html")
	if err != nil {
		return nil, fmt.Errorf("server: parse index.html: %v", err)
	}

	s := &Server{
		db: db,
		router: mux.NewRouter(),
		indexTpl: indexTpl,
	}
	s.routes()
	return s, nil
}
// New returns a new world map server that queries against the provided country db.
New returns a new world map server that queries against the provided country db.
// New returns a new world map server that queries against the provided country db .
func New(db countrydb.DB) (*Server, error) {
	indexTpl, err := template.ParseFiles("templates/index.html")
	if err != nil {
		return nil, fmt.Errorf("server: parse index.html: %v", err)
	}
	s := &Server{
		db: db,
		router: mux.NewRouter(),
		indexTpl: indexTpl,
	}
	s.routes()
	return s, nil
}
func New ( db countrydb . DB ) ( * Server , error ) { indexTpl , err := template . ParseFiles ( " " ) if err != nil { return nil , fmt . Errorf ( " " , err ) } s := & Server { db : db , router : mux . NewRouter ( ) , indexTpl : indexTpl , } s . routes ( ) return s , nil }
New returns a new world map server that queries against the provided country db.
New returns a new world map server that queries against the provided country db .