You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
In my latest blog post about Stormpath on HyperDev, I had to write sample code that looks like this:
app.get('/global-counter',function(req,res){req.app.get('stormpathApplication').getCustomData(function(err,customData){if(!customData){returnres.status(500).send("Internal Server Error")}if(typeofcustomData.visitCount!="number"){customData.visitCount=1}res.send("People have visited this page "+customData.visitCount+" times!")customData.visitCount=customData.visitCount+1customData.save()})})
I think it makes sense for the {expand: "customData"} config option to also add customData to stormpathApplication, so I only have to do: