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

how to empty db? #11

Open
lmccart opened this issue Nov 30, 2014 · 1 comment
Open

how to empty db? #11

lmccart opened this issue Nov 30, 2014 · 1 comment

Comments

@lmccart
Copy link

lmccart commented Nov 30, 2014

I'm trying to do something like this:
https://github.com/lmccart/itp-networked-media/blob/master/week6/09_create_db/server.js

of course, each time I run server.js again, it adds more to the db once it has been initially created. is there a command we could add like dropDB that would recreate the db, or is there something to test if it already exists so I don't repopulate it?

@vanevery
Copy link
Collaborator

vanevery commented Dec 3, 2014

That would certainly be helpful. One possibility is to check if the db file exists using the fs module but I agree that should be incorporated into servi.

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