In fs.writeFile(file, data, options, callback) function, when it comes to options we can specify mode(integer)
I want to get to know what can be possible integers for different file modes
You can find the file modes available here.
You can create octals yourself as per documentation.
An easier method of constructing the mode is to use a sequence of three octal digits (e.g. 765). The left-most digit (7 in the example), specifies the permissions for the file owner. The middle digit (6 in the example), specifies permissions for the group. The right-most digit (5 in the example), specifies the permissions for others.
Read only should be 0o444