TAG: meanjs

Authentication for Express using PassportJS – Part 1

Like any other web application your MEAN project need an authentication system to protect sections. User must register to visit some page or use some feature. For the Express framework the best solution you can take is to use a module called PassportJS. Passport can be use to authenticate users with more then 140 strategies like local storage, facebook, google or twitter.

File upload to GridFS on MEAN stack – MeanJS

Last day i was excited when reading about the GridFS feature of mongoDB.

GridFS is a specification for storing and retrieving files that exceed the BSON-document size limit of 16MB.

Instead of storing a file in a single document, GridFS divides a file into parts, or chunks, and stores each of those chunks as a separate document. By default GridFS limits chunk size to 255k. GridFS uses two collections to store files. One collection stores the file chunks, and the other stores file metadata.

MongoDB site

What we want to achieve with this tutorial is the ability for our app to upload a file from a form and save it to a mongoDB – GridFS store and the retrive it with a GET call.

There are no more results.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close