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

Populate db from fs #1

Open
juliangruber opened this issue May 17, 2013 · 2 comments
Open

Populate db from fs #1

juliangruber opened this issue May 17, 2013 · 2 comments

Comments

@juliangruber
Copy link

It would be cool to say

http.createServer(static(db, __dirname + '/static')).listen(PORT)

level-static would start putting everything in ./static into leveldb, ignoring existant files based on mtimes and watching the directory for further changes.

If a file is requested that isn't in LevelDB yet it should just be served from the FS.

@dominictarr
Copy link
Owner

I don't think there is much point in doing that directly, but it may be worth doing that via some other mechanism,
like, add metadata that can return the hashes of the things in the db, and then update the things that have changed.

you could use that to get a tophash or a HEAD query, and then have a client that synced that stuff intelligently.

@juliangruber
Copy link
Author

Ah, so this isn't the typical nodejs static file server libary, I see

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

2 participants