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

Database storage location #4

Closed
CodingCarlos opened this issue Jan 27, 2017 · 0 comments
Closed

Database storage location #4

CodingCarlos opened this issue Jan 27, 2017 · 0 comments

Comments

@CodingCarlos
Copy link
Member

Working in GoblinSocket, I found that GoblinDB has no default file in configuration. Due to that, i got an epic crash when triying to initialize the databse on the first time.

not-goblin

But, when I went to node_modules/goblindb there was a file called goblin_db.json. So, what the hell was happening?

I opened the config.js, and I added the file param, so the file ended as this:

module.exports = {
    logPrefix: "[GoblinDB]",
    file: 'goblin_bd.json'
}

And it started working. But I realized that there was a new file in my GoblinSocket directory, called goblin_bd.json. What was happening? Relative routes.

/GoblinSocket
 - /node_modules
 - - /goblindb
 - - - goblin_db.json   <--- THIS IS NOT THE DB
 - goblin_db.json       <--- THIS IS THE DB
 - index.js

So, maybe next steps could be make a consistent documentation of where the db will be stored, and try to prevent that errors, to avoid unexpected crashes that may damage the data storage.

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