A Web & API app built using low-level NodeJS APIs (Implementing NodeJS without using NPM for web, api & cli)
A boilerplate or a sample built in NodeJS without using any NPM packages covering all (or most) of the Node’s API modules
NodeJS (LTS) ie. >= 8.11.3
# Clone this repo using your terminal
git clone https://github.com/faizahmedfarooqui/nodejs.git;
# Go inside the repo
cd nodejs;
# Make a data directory into the root of the project
mkdir .data && cd .data;
# Create 3 more directories into the .data directory
mkdir users checks tokens;
# Go back to project's root
cd ..;
# Make a logs directory into the root of the project
mkdir .logs;
# Goto the https directory
cd https;
# Now run the command given in the file keyGeneration.txt
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
---------------------------------------------------------------------------------------------------------------------------------------------------------
CLI Manual
---------------------------------------------------------------------------------------------------------------------------------------------------------
exit Kill the CLI (and the rest of the application)
man Show this help page
help Alias of the "man" command
stats Get statistics on the underlying operating system and resource utilization
List users Show a list of all the registered (undeleted) users in the system
More user info --{userId} Show details of a specified user
List checks --up --down Show a list of all the active checks in the system, including their state. The "--up" and "--down flags are both optional."
More check info --{checkId} Show details of a specified check
List logs Show a list of all the log files available to be read (compressed only)
More log info --{fileName} Show details of a specified log file
node inspect index-debug.js
NODE_DEBUG=performance node index.js
in your terminalnode index-cluster.js
in your terminalls
commands into the .logs
folder from CLI commands list logs
(View Code)Please read the CONTRIBUTING.md
Please read the file CODE_OF_CONDUCT.md