Now if I have a .json configuration file and I need to get the values of the configuration in my application as a novice node.js developer , I will read the .json file using file system module as shown below nodejs-read-json-sync - Files./usr/lib/nodemodules/read-json-sync/index.js. There are already a few configuration modules available for Node.js. I built myself a simple read-only configuration module for Node.js as a learning experience. The module reads configuration information from a JSON file like the following. A Node.js module to read and parse a JSON file synchronously. const readJsonSync require( read-json-sync)Node.js built-in require and import can do almost the same thing, but this module doesnt cache results. Node.js v9.6.1 Documentation. Index. View on single page. View as JSON.OSYNC.
Flag indicating that the file is opened for synchronized I/O with write operations waiting for file integrity. ODSYNC. Returning the content of multiple files in node.