For structuring, all my imports have the following order:
// core imports
const http = require("http");
// third party imports
const express = require('express');
// self made imports
This is just my personal preference
An explicit NodeJs version can be installed from teh tar.gz file. Below are the steps to install the prefered version.
sij@sijmi:~/Downloads$ node -v
bash: node: command not found
sij@sijmi:~/Downloads$ sudo t...
In your Node.js project, there is a package.json file, which includes all the npm modules, your project depends on. To automatically add a npm module on install to this file, you have to enter the following command.
npm i bcrypt --save
The key is “–save”. Through that parameter, bcrypt will auto...
I have created a NodeJs wep app, which I wanted to host on a unmanaged server. This guide shows how I have done it on an ubuntu 18.10 lts server.
Environment variables for NodeJs
If the web app is on a production server, it should know that. Otherwise some installed npm packeges log extensively....