Guest User

Untitled

a guest
Apr 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. const _ = require('lodash')
  2. const yaml = require('js-yaml')
  3. const fs = require('fs');
  4.  
  5. const dotPaths = [...]
  6. const cfg = {}
  7.  
  8. _.each(dotPaths, function(path) {
  9. _.set(cfg, path, path)
  10. });
  11.  
  12. fs.writeFile('mongod.conf', yaml.safeDump(cfg), (err) => {
  13. if (err) throw err;
  14. console.log('mongod.conf saved.')
  15. });
Add Comment
Please, Sign In to add comment