How to get the first date of the current month in Node.js?

Changing the native Date object in the accepted answer is bad practice; don't do that ( https://stackoverflow.com/a/8859896/3929494 )

You should use moment.js to give you a consistent environment for handling dates in JavaScript between node.js and all browsers - see it as an abstraction layer. http://momentjs.com/ - it's quite easy to use.

A very similar example is here: https://stackoverflow.com/a/26131085/3929494

You can try it on-line at https://tonicdev.com/jadaradix/momentjs