Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Reference_description_with_linked_URLs____________________________Notes__________________________________________________________________
m Javascript and Nodejs references 
m Javascript
i Javascript


https://drive.google.com/open?id=1gtGNXt1mBN-UOKVboB2l3cRhUZLr3zz6Nodejs cheat sheet
https://drive.google.com/open?id=122X-MwR-7LctVRuWjefGduliSZf_Acs1Nodejs book - free code camp
https://drive.google.com/open?id=1vlz4U_-KgmDf-IyeXd4W1JxL-AZz5vHcBeginner Nodejs book
https://drive.google.com/open?id=1RkkEkEIV1-BMY-23tnPw93LVYDbD-Dn8Beginner Nodejs book part 2 - Craftsman
https://drive.google.com/open?id=0BxqKQGV-b4WQY3pIZV8ycHlISEkNpm Beginners Guide

https://www.scottklement.com/presentations/#WORLDOFNODE

nodejs-ibmi-klement-session-World of NodeJS on IBM i.pdf

https://drive.google.com/open?id=1jAJtSpNoGW8K8ABE20FI9ej7ZGClcn7m

https://drive.google.com/open?id=1N32OltwVm4MUm5Iz98ygOIfQl5L93W4j

Scott Klement Nodejs intro for IBM i
https://github.com/nvm-sh/nvmNVM for Node Version Mgt on any platform
https://bytearcher.com/articles/ways-to-get-the-latest-node.js-version-on-a-mac/Nodejs versions and upgrade options 1 - MACOS
https://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-versionNodejs versions and upgrade options 1 - Linux
https://www.w3schools.com/nodejs/ref_modules.aspW3Schools Nodejs NPM **

Node configuration module for environment variables


https://www.guru99.com/node-js-tutorial.html

Tutorial - Full Node.js course - 3 days est - guru99 - excellent - quick

Nodej.js, Express, MongoDB - test w curl

https://www.guru99.com/node-js-create-server-get-data.htmlTutorial - Create Node.js Data server - guru99
https://developer.okta.com/blog/2019/06/18/command-line-app-with-nodejsNode.js CLI app with OAuth security


https://thevalleyofcode.com/html/ online

html-handbook.pdf file

html handbook flavio 

https://thevalleyofcode.com/css/ online

css-handbook.pdf file

css handbook flavio

https://thevalleyofcode.com/js/ online

js-handbook.pdf file

javascript handbook

https://thevalleyofcode.com/node/ online 

node-handbook.pdf file

nodejs handbook

https://thevalleyofcode.com/react/ online

react-handbook.pdf file

react handbook

https://thevalleyofcode.com/next/ online

next-handbook.pdf file

nextjs handbook


Frameworks
























































https://drive.google.com/open?id=0BxqKQGV-b4WQdlFPSV9hQ0szamMStrongLoop
https://www.profoundlogic.com/profoundjs/Profound.js allows you to easily develop business applications and modernize legacy RPG applications using Node.js. Why not try "learning by doing"?

https://github.com/nestjs/nest

https://docs.nestjs.com/

Nestjs - an abstracted Node.js services framework built in typescript allows both Javascript and Typescript development.
https://www.slideshare.net/thesoftwarehouse/one-tool-to-rule-them-allNestjs overview slides
https://www.slideshare.net/RafaelCasusoRomate/solid-nodejs-with-typescript-jest-nestjsNestjs SOLID design
https://www.slideshare.net/nirkaufman/nestjs-masterclass-slidesNestjs Master class - 46 slides
https://www.slideshare.net/BabacarNIANG6/end-to-end-todo-list-app-with-nestjs-angular-redux-redux-sagaNestjs Todo app w Angular




Web Sockets

https://www.nodebeginner.org/blog/post/nodejs-tutorial-how-to-work-with-websockets/

https://drive.google.com/open?id=1jdcAQrY3zLP3AiSu0DCSx0w2F38KjDmq

Nodejs Web sockets example with socket.io

use this tutorial for websockets first

https://medium.com/@martin.sikora/node-js-websocket-simple-chat-tutorial-2def3a841b61

file:///C:/Users/Jim%20Mason/Google%20Drive/_docs/howto/js/node/tutorials/web-sockets-nodejs-chat-tutorial-medium.com-Nodejs%20amp%20WebSocket%20%20Simple%20chat%20tutorial.pdf

Web sockets example in Nodejs without Socket.io
https://github.com/websockets/wsSimple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js


Nodejs frameworks


 https://polterguy.github.io/ Magic Nodejs REST Angular CRUD generator - 600 per server


https://www.npmjs.com/package/harconharcon is a microservice solution for NodeJS/Browser giving superior abstraction layer for interoperability between entities in a highly structured and fragmented ecosystem. It allows you to design and implement complex workflows and microservices where context and causality of messages are important.
Nodejs tools
https://code.visualstudio.com/docs/nodejs/nodejs-tutorialVSCode for Nodejs tutorial

m Github Hello World Tutorial

m Github scm

Github

...

https://docs.npmjs.com/cli/v6/commands/npm-uninstall/

npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|-D|--save-dev|-O|--save-optional|--no-save]

to remove the NPM global package 

...

$ npm install config
$ mkdir config
$ vi config/default.json
{
  // Customer module configs
  "Customer": {
    "dbConfig": {
      "host": "localhost",
      "port": 5984,
      "dbName": "customers"
    },
    "credit": {
      "initialLimit": 100,
      // Set low for development
      "initialDays": 1
    }
  }
}

Edit config overrides for production deployment:

 $ vi config/production.json
{
  "Customer": {
    "dbConfig": {
      "host": "prod-db-server"
    },
    "credit": {
      "initialDays": 30
    }
  }
}

Use configs in your code:

const config = require('config');
//...
const dbConfig = config.get('Customer.dbConfig');
db.connect(dbConfig, ...);

if (config.has('optionalFeature.detail')) {
  const detail = config.get('optionalFeature.detail');
  //...
}

config.get() will throw an exception for undefined keys to help catch typos and missing values. Use config.has() to test if a configuration value is defined.

Start your app server:

$ export NODE_ENV=production
$ node my-app.js

...

https://stackabuse.com/reading-and-writing-csv-files-in-nodejs-with-node-csv/

install the entire node-csv suite:

npm install node-csv

Read csv file with fileStream and Callback api

csv-parse package provides multiple approaches for parsing CSV files - using callbacks, a stream + callback as well as the Sync and Async API. We'll be covering the stream + callback API and the Sync API.

var fs = require('fs'); 
var parse = require('csv-parse');
var parser = parse({columns: true}, function (err, records) {
console.log(records);
});

fs.createReadStream(__dirname+'/chart-of-accounts.csv').pipe(parser);

, we create a parser which accepts an object literal, containing the options we'd like to set. The second argument is the callback function that's used to access the records - or just print them out, in our case.

Options to specify for the fs include:

  • The delimiter option defaults to a comma ,. If the data from the file you’re trying to parse uses some other delimiter like a semi-colon ;, or a pipe |, you can specify that with this option.

  • The cast option defaults to false and is used to indicate whether you want to cast the strings to their native data types. For example, a column that is made up of date fields can be cast into a Date.

  • The columns option is to indicate whether you want to generate the record in the form of object literals. By default, this column is set to false and records are generated by the parser in the form of arrays. If set to true, the parser will infer the column name from the first line.

...

Write file using csv-stringify

from the node-csv suite. Stringification just means that we'll convert some data (JSON in our example) into a string. This string is then written to a file, in CSV format.

The csv-stringify package also has a couple of API options, though, the Callback API offers a really simple way to stringify data, without the need to handle events like with the Stream API.


reading csv file with Stringifier

stringifier.on('readable', function(){
  let row;
  while(row = stringifier.read()){
    data.push(row)
  }
})


URL module 

https://www.w3schools.com/nodejs/nodejs_url.asp

...

Mongoose and schema access to MongoDb


Populate on query result


’ll check the endpoint.
This should be setting sellingPrice as a priceSchema which is:

{
 dollars: Number,
 cents: Number (optional),
 currency: 'usd' (default)
}

...

has been blocked by CORS policy

Access to XMLHttpRequest at 'https://ebc-api-dev.sysopsnetwork.com/authentication' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

What domain are you making your XMLHttpRequest from and to? CORS is a client-side operation; first you need to identify (1) what page is making the blocked XMLHttpRequest and then where it is making the request to. The error you pasted seem incomplete, so I'm not clear on how to help. Also it would help if you also included which domain the above Express code is running under as well.


https://github.com/expressjs/cors/issues/184

...

@dougwilson

Member
dougwilson commented on Jan 28, 2020
Gotcha. So which one of those parts are using XMLHttpRequest? It sounds to me based on your description like the XMLHttpRequest is the request to localhost:8090, which is redirected to sso.dol.gov. If this is the case, the sso.dol.gov domain is what needs CORS policy applied to it to allow calls from localhost:3200.

If this is the case, the sso.dol.gov domain is what needs CORS policy applied to it to allow calls from localhost:3200.

Handling CORS error in Nodejs

https://stackabuse.com/handling-cors-with-node-js/



Candidate Solutions




Magic Nodejs REST Angular CRUD generator - 600 per server

https://polterguy.github.io/

see demo - looks good

server pricing may be an issue except for smaller accounts on cloud or on-prem


Magic will read metadata from your database. It will use this metadata to generate an HTTP REST Web API for you, wrapping all CRUD operations inside of REST endpoints. Then it will use metadata from the REST API to automatically generate Angular components, router links, menu items, datagrids, etc. The end result becomes that before you’ve even had to create as much as a single line of code yourself, 90% of your job is already done.

...