Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I saw we had some discussion in #53 about db support. I am new to node.js, mongodb (and even front-end), so I decide to try this for fun.
In order to use mongodb, I added 'storageType', 'mongoUri', 'dbRefreshInterval' three additional fields (see example in mongoSetup.js). User can choose either 'database' or 'filesystem', though just a couple of lines change can make it to load from both; watcher works by using timer.
Right now, the only option of create/update/delete posts is by editing database directly (in mongoSetup, I pointed it to a demo db running on mongohq, and I will just leave it there for demo). Therefore, an editor might be a good idea for next step, then access control to avoid other user to create/editor posts might be next->next step, then...=_=||
Please let me know if you have any suggestions, and if you see anything wrong about my code, i.e) code style, logic, grammar etc, please point it out. Thanks!
(Jordan, thanks for writing such as great blog engine!)
btw, my code also had the fix made by Matt in #55, #77ca309. I think it should be merged to fix 'deleted posts were not gone' bug.