https://jestjs.io/docs/getting-started
npm i jest --save-dev
npm i supertest --save-dev
https://jestjs.io/docs/getting-started
npm i jest --save-dev
npm i supertest --save-dev
GNOME Disks (gnome-disk-utility) equivalent in KDE: Startup Disk Creator (usb-creator-kde)
https://tails.boum.org/install/linux/index.en.html
Node.js server and React client:
Node.js server and React client:
//
node > http
STATUS_CODES: {
'100': 'Continue',
'101': 'Switching Protocols',
'102': 'Processing',
'103': 'Early Hints',
'200': 'OK',
'201': 'Created',
'202': 'Accepted',
'203': 'Non-Authoritative Information',
'204': 'No Content',
'205': 'Reset Content',
'206': 'Partial Content',
'207': 'Multi-Status',
'208': 'Already Reported',
'226': 'IM Used',
'300': 'Multiple Choices',
'301': 'Moved Permanently',
'302': 'Found',
'303': 'See Other',
'304': 'Not Modified',
'305': 'Use Proxy',
'307': 'Temporary Redirect',
'308': 'Permanent Redirect',
'400': 'Bad Request',
'401': 'Unauthorized',
'402': 'Payment Required',
'403': 'Forbidden',
'404': 'Not Found',
'405': 'Method Not Allowed',
'406': 'Not Acceptable',
'407': 'Proxy Authentication Required',
'408': 'Request Timeout',
'409': 'Conflict',
'410': 'Gone',
'411': 'Length Required',
'412': 'Precondition Failed',
'413': 'Payload Too Large',
'414': 'URI Too Long',
'415': 'Unsupported Media Type',
'416': 'Range Not Satisfiable',
'417': 'Expectation Failed',
'418': "I'm a Teapot",
'421': 'Misdirected Request',
'422': 'Unprocessable Entity',
'423': 'Locked',
'424': 'Failed Dependency',
'425': 'Too Early',
'426': 'Upgrade Required',
'428': 'Precondition Required',
'429': 'Too Many Requests',
'431': 'Request Header Fields Too Large',
'451': 'Unavailable For Legal Reasons',
'500': 'Internal Server Error',
'501': 'Not Implemented',
'502': 'Bad Gateway',
'503': 'Service Unavailable',
'504': 'Gateway Timeout',
'505': 'HTTP Version Not Supported',
'506': 'Variant Also Negotiates',
'507': 'Insufficient Storage',
'508': 'Loop Detected',
'509': 'Bandwidth Limit Exceeded',
'510': 'Not Extended',
'511': 'Network Authentication Required'
},
https://nodejs.org/api/http.html
//
//
@desc Logs request to console
Morgan - HTTP request logger middleware for node.js
https://www.npmjs.com/package/express-requests-logger
https://github.com/expressjs/morgan
npm i morgan
throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn))
Check module.exports = ...
Extract unique values from arr1:
https://stackoverflow.com/questions/66527958/only-add-item-to-array-if-unique-otherwise-delete-react
https://stackoverflow.com/questions/11246758/how-to-get-unique-values-in-an-array
https://stackoverflow.com/questions/1960473/get-all-unique-values-in-a-javascript-array-remove-duplicates
https://stackoverflow.com/questions/15125920/how-to-get-distinct-values-from-an-array-of-objects-in-javascript
- function to generate unique keys/ids/numbers/strings and use that
- existing npm packages like uuid, uniqid, etc
- generate random number `key-${new Date().getTime()}` with prefix from item being iterated
- using the unique ID from the database