initial mongoose commit

will add mongoose

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
added mongoose

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
midway through some testing with mongoose

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
from tutorial

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
working on new tutorial

started working from a different online tutorial.

http://pixelhandler.com/blog/2012/02/09/develop-a-restful-api-using-node-js-with-express-and-mongoose/
Signed-off-by: Angello Pozo <sogoiii@gmail.com>
Completed the tutorial.

-completed tutorial
-i have an idea as to how the whole mongoose thing works
-need to work a little bit more to completely understand

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
Completed mongoose in routes example

working version i can refer to if i break something in he future.

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
second commit

just testing a few other things

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
Decoupled DBfuntions into a new file

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
Moved routes.js into a different file

routes.js is the main file for routing
the files in ./routes/* are definitions of the route

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
did a query

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
User registration and login are email and password based

the next step is to add bcrypt to the password backend

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
Added bcrypt

- hash and salt is saved to teacherUser
- unable to get a return message.
 i have an idea as to how to do it, but they didn't work. i have to change the callback definition to be something like:
function(err,email, messageresult)
then i can do something like return done(err,email,{message: messageresult});

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
Fixed message not appearing on login page

its an ugly solution, but hey it works.

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
small changes?

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
small change

trying to merge with master

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
uploading and displaying images

upload an image to mongo gridfs and then view it. midway through

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
can view images that are uploaded

next step is to check if a file is selected before uploading anything to grids.

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
Completed the upload section

-will check if file format is correct
-will display upload complete
-will provide error upon wrong file format

-next step is to create the overall layout of the program.

Signed-off-by: Angello Pozo <sogoiii@gmail.com>
Added sessions, access control, basic user interface

- basic ui
- sessions with mongostore
- access control : aka user 5 cannot access user 6 url
- javascript is working

Signed-off-by: Angello Pozo <sogoiii@gmail.com>