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

mongodb support #85

Closed
wants to merge 2 commits into from
Closed

mongodb support #85

wants to merge 2 commits into from

Conversation

renjiexu
Copy link

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.

@renjiexu
Copy link
Author

Hmm...may I ask do we have the fix for this already? It is caused by express 4, reported in #77, the test works for 3.x version. Thanks.

@renjiexu
Copy link
Author

Sorry, I think I should not use master branch for the pull request. By reading isaacs/github#18, I think I cannot edit the branch unless close this and open a new one. Please comment if you think this db support feature is interesting and I can open another pull request. Sorry for the mess, thanks.

@renjiexu renjiexu closed this Apr 12, 2014
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

Successfully merging this pull request may close these issues.

1 participant