Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileServer prefix path problem #81

Closed
didip opened this issue Aug 30, 2016 · 1 comment
Closed

FileServer prefix path problem #81

didip opened this issue Aug 30, 2016 · 1 comment

Comments

@didip
Copy link

didip commented Aug 30, 2016

import (
    "os"
    "net/http"
    "github.com/pressly/chi"
)

r := chi.NewRouter()

workDir, _ := os.Getwd()
r.FileServer("/static", http.Dir(filepath.Join(workDir, "static")))

Expected URL: /static/moment/moment.min.js
But I got: /moment/moment.min.js

How can I set it so the /static prefix is preserved?

@didip
Copy link
Author

didip commented Aug 30, 2016

This is my mistake, the feature works as expected.

Sorry for wasting your time.

@didip didip closed this as completed Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant