javascript – How to use momentjs with handlebars?

I'm using nodejs express with handlebars I need to do many dates calculations and I found momentsjs, my question is where is it best to use moment if in the back-end or in the front-end, according to that how could I configure momentsjs so I can use it