How to solve "mongod.service main process exited code=exited status=100/n/a" For me, this did the trick: chown -R mongodb:mongodb /data Source: - https://stackoverflow.com/questions/45691032/mongod-service-start-exits-with-code-100
How to solve "mongod.service: Main process exited, code=exited, status=14/n/a" For me this did the trick: chown mongodb:mongodb /tmp/mongodb-27017.sock More about this, in the link below. Source: - https://askubuntu.com/questions/823288/mongodb-loads-but-breaks-returning-status-14
How to configure a MongoDB replica set (local machine) This post will guide you through the steps to set up a local replica set with two members and one arbiter. In a production environment the steps must be almost the same except that instead of starting three local MongoDB instances in different ports you would start an instance of
Permission Table for Linux (quick reference) I am sure you have wondered what is the right permission for your file and tried to understand how it works, why there are numbers and letter and what all that mess means. Well here is a table that puts it in a very simple way, I am assuming you
How to parse JSON files in Node.JS? Quick tip using fs: let data = fs.readFileSync("myFile.json", 'utf8'); console.log(typeof JSON.parse(data)); There is another way to do this that requires less effort. Using require directly, like so: const data = require("myFile.json"); console.log(typeof data); Or you
How to pack Node.JS project into a tarball? Today I needed to install my brand new NodeJS-developed CLI application in my computer. Important! Don’t forget to add this to your package.json file: "bin": { "skynet": "./bin/skynetApp.js" }, It’s basically the name of the command and the NodeJS file it
How to generate RSA key pair in Node.JS? Very straight forward process. Not complicated at all, I would say that the most difficult part would be to actually tweak the options, however the code below actually works and provides you the time it took to generate the key pair as well, just for informational purposes. Run the following