milad zahedi
milad zahedi

Reputation: 807

snap snaplets : benefits of warpping a DB package in a snaplet

I want to run a web API with snap and I am going to use mongoDB. The hackage provides a well designed package named The mongoDB package. What benefits will I get if I use mongoDB package wrapped in a snaplet as opposed to use it alone.

Upvotes: 1

Views: 43

Answers (1)

mightybyte
mightybyte

Reputation: 7272

The advantage is kind of the same as with using any other library--roughly that you won't have to write the code that the package author put in the package. I haven't looked at the mongodb snaplets in years, but this will probably be some code to read config data from the config file, set up the DB connections, etc.

Upvotes: 1

Related Questions