Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Sessions/Auth and Database #110

Closed
brainjuicer opened this Issue · 9 comments

4 participants

@brainjuicer

Hi,

So I started using Geddy for a project that requires not only a database like MongoDB, but also a session and authentication system that logs clients in and out of the website. My question is, how would you use a nodejs module with Geddy (the mongodb wrapper), and how do implement sessions in Geddy? Thanks for any reply.

@Techwraith
Owner

Awesome! I can help you with the first question.

First off, take a look at https://github.com/mde/geddy/tree/master/examples/todo_app_mongo

This is an example app that uses mongo as the DB. You'll want to do something very similar. If you have any further questions, let me know.

I think @mde can help you a little better than I can with the second. Geddy has sessions built right in (with memcache if you'd like), and before filters - so implementing auth flows should be pretty simple.

(it would also be cool to know what you're building!)

@mde
Owner

Yes, as @Techwraith says, sessions are built right in. You can choose between cookie, memory, and memcache. (You shouldn't use memory unless you're only running one process per Geddy instance.) There's no docs yet for the sessions, but I'll try to add a short wiki page for that this weekend.

@yelongren

Excellent! Looking forward to that wiki on sessions, thanks.

@brainjuicer

Thanks guys, I appreciate the help. @Techwraith, I would love to tell you what I'm doing, but that's classified (sorry). Also, I have another question. How do I bundle the mongo-db wrapper into my project? Is it though the command line or something? Thanks.

Aero

@Techwraith
Owner

@brainjuicer just do npm install mongodb-wrapper. That will install it in the ./node_modules directory in your app.

@brainjuicer

Oops! Never mind, answered my own question there. Thanks for all the help.

@brainjuicer brainjuicer reopened this
@brainjuicer

Never mind I see you answered it.

@brainjuicer brainjuicer reopened this
@brainjuicer

Hi @mde, please don't take this the wrong way, but could you please try and do the sessions wiki this weekend. I need to finish this project within the next week or the week after. Thanks.

@mde
Owner
mde commented

No issues -- I can't always promise when I can get to stuff -- but it was fairly short and easy to knock out: https://github.com/mde/geddy/wiki/Sessions Feel free to add details or clarifications if you find stuff as you're using sessions.

Note also that @cheggaaa was awesome and just added Redis as a data-store for sessions. :)

@mde mde closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.