Page tree

Michael O'Brien

Skip to end of metadata
Go to start of metadata

See

https://loopback.io/ - API and microservices for NodeJS

Quickstart

https://angular.io/guide/quickstart

Angular requires Node.js 1.8+ and uses Typescript

Install node from https://nodejs.org/en/

Installing Node 12.13.1 and npm 6.12.1

biometric:ecs-app-source michaelobrien$ node -v
v12.13.1
biometric:ecs-app-source michaelobrien$ npm -v
6.12.1

biometric:ecs-app-source michaelobrien$ npm install -g @angular/cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR!   stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/michaelobrien/.npm/_logs/2019-12-17T02_09_22_723Z-debug.log
biometric:ecs-app-source michaelobrien$ sudo npm install -g @angular/cli
Password:
/usr/local/bin/ng -> /usr/local/lib/node_modules/@angular/cli/bin/ng
> @angular/cli@8.3.20 postinstall /usr/local/lib/node_modules/@angular/cli
> node ./bin/postinstall/script.js
? Would you like to share anonymous usage data with the Angular Team at Google under
Google’s Privacy Policy at https://policies.google.com/privacy? For more details and
how to change this setting, see http://angular.io/analytics. No
+ @angular/cli@8.3.20
added 251 packages from 186 contributors in 14.062s

biometric:wse_angular michaelobrien$ ng new biometric
? Would you like to add Angular routing? No
? Which stylesheet format would you like to use? CSS
CREATE biometric/README.md (1027 bytes)
CREATE biometric/.editorconfig (246 bytes)
CREATE biometric/.gitignore (631 bytes)
CREATE biometric/angular.json (3617 bytes)
CREATE biometric/package.json (1295 bytes)
CREATE biometric/tsconfig.json (543 bytes)
CREATE biometric/tslint.json (1953 bytes)
CREATE biometric/browserslist (429 bytes)
CREATE biometric/karma.conf.js (1021 bytes)
CREATE biometric/tsconfig.app.json (270 bytes)
CREATE biometric/tsconfig.spec.json (270 bytes)
CREATE biometric/src/favicon.ico (948 bytes)
CREATE biometric/src/index.html (295 bytes)
CREATE biometric/src/main.ts (372 bytes)
CREATE biometric/src/polyfills.ts (2838 bytes)
CREATE biometric/src/styles.css (80 bytes)
CREATE biometric/src/test.ts (642 bytes)
CREATE biometric/src/assets/.gitkeep (0 bytes)
CREATE biometric/src/environments/environment.prod.ts (51 bytes)
CREATE biometric/src/environments/environment.ts (662 bytes)
CREATE biometric/src/app/app.module.ts (314 bytes)
CREATE biometric/src/app/app.component.css (0 bytes)
CREATE biometric/src/app/app.component.html (25498 bytes)
CREATE biometric/src/app/app.component.spec.ts (990 bytes)
CREATE biometric/src/app/app.component.ts (213 bytes)
CREATE biometric/e2e/protractor.conf.js (808 bytes)
CREATE biometric/e2e/tsconfig.json (214 bytes)
CREATE biometric/e2e/src/app.e2e-spec.ts (642 bytes)
CREATE biometric/e2e/src/app.po.ts (262 bytes)
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

> fsevents@1.2.11 install /Users/michaelobrien/wse_angular/biometric/node_modules/@angular/compiler-cli/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> fsevents@1.2.11 install /Users/michaelobrien/wse_angular/biometric/node_modules/karma/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> fsevents@1.2.11 install /Users/michaelobrien/wse_angular/biometric/node_modules/watchpack/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> fsevents@1.2.11 install /Users/michaelobrien/wse_angular/biometric/node_modules/webpack-dev-server/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> core-js@2.6.11 postinstall /Users/michaelobrien/wse_angular/biometric/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.2.1 postinstall /Users/michaelobrien/wse_angular/biometric/node_modules/core-js
> node scripts/postinstall || echo "ignore"


> core-js-pure@3.5.0 postinstall /Users/michaelobrien/wse_angular/biometric/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@2.6.11 postinstall /Users/michaelobrien/wse_angular/biometric/node_modules/karma/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> @angular/cli@8.3.20 postinstall /Users/michaelobrien/wse_angular/biometric/node_modules/@angular/cli
> node ./bin/postinstall/script.js

? Would you like to share anonymous usage data with the Angular Team at Google under
Google’s Privacy Policy at https://policies.google.com/privacy? For more details and
how to change this setting, see http://angular.io/analytics. No
npm WARN axobject-query@2.1.1 requires a peer of eslint@^5 || ^6 but none is installed. You must install peer dependencies yourself.

added 1471 packages from 1072 contributors and audited 18944 packages in 43.804s
found 3 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
    Successfully initialized git.


biometric:wse_angular michaelobrien$ ls
biometric
biometric:wse_angular michaelobrien$ cd biometric
biometric:biometric michaelobrien$ ls
README.md		browserslist		karma.conf.js		package-lock.json	src			tsconfig.json		tslint.json
angular.json		e2e			node_modules		package.json		tsconfig.app.json	tsconfig.spec.json
biometric:biometric michaelobrien$ ng serve --open
10% building 3/3 modules 0 activeℹ 「wds」: Project is running at http://localhost:4200/webpack-dev-server/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: 404s will fallback to //index.html

chunk {main} main.js, main.js.map (main) 47.8 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 264 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 9.72 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 3.81 MB [initial] [rendered]
Date: 2019-12-17T02:14:41.216Z - Hash: 309894bf461b16a0340d - Time: 4257ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
ℹ 「wdm」: Compiled successfully.

Install TypeScript

https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html

biometric:biometric michaelobrien$ sudo npm install -g typescript
Password:
/usr/local/bin/tsc -> /usr/local/lib/node_modules/typescript/bin/tsc
/usr/local/bin/tsserver -> /usr/local/lib/node_modules/typescript/bin/tsserver
+ typescript@3.7.3
added 1 package from 1 contributor in 0.909s

vi greeter.ts
function greeter(person) {
    return "Hello, " + person;
}
let user = "Jane User";
document.body.textContent = greeter(user);

biometric:biometric michaelobrien$ tsc greeter.ts 
biometric:biometric michaelobrien$ ls
greeter.js	greeter.ts


Deployment


Docker Image

Helm Chart

DevOps

History

Usage

Links


  • No labels