Here is an example of a complete Node.js script that listens for a response from a WebSocket server: const WebSocket
Tag: nodejs
AWS Nodejs Load Credential from JSON
Load crendentials from json file Set up a config.json as follows: { “accesskeydId”: “”, “secretAccessKey”: “”, “sessionToken”:””, “securityToken”: “”, “region”:”us-west-2″
npm notes
Force generating package-lock.json npm i –package-lock-only To install a particular version of node package npm i [package name]@[version] To see
AWS Credential in Nodejs File
Adding via Shared File Credential, specifying profile name: Shared File Credentials: [default] ; default profile aws_access_key_id = aws_secret_access_key = [personal-account]
NodeJS set time out for an API call
https://stackoverflow.com/questions/63248292/how-to-set-a-time-limit-to-a-method-in-nodejs Following code snippet demonstrates the usage of timeout function written above. It mocks a api request that returns a response after
Start A New Nodejs Program
mkdir program name npm init this will create package.json if using Git, install Git first before this step. Otherwise, package.json
Nodejs Notes
How to uninstall nodejs from mac use command which node to find where the node executable is Start a quick