Skip to content

jpralves10/meat-app

Repository files navigation

MeatApp

This project was generated with Angular CLI version 1.6.7.

Development server

Instalar Angular CLI

Starter service: ng serve ou npm start
Navigate to http://localhost:4200/

Instalar Json Server

Mocking backend: json-server db.json ou node backend/server
Navigate to http://localhost:3000/

Generate JS from TS

Transpiling TypeScript into JavaScript Command compiler tsc -w

Generate Component

ng generate component component-name
ng generate directive|pipe|service|class|guard|interface|enum|module
ng g c component-name --spec=false

Compilar e Testar

1. Compilar (--extract-css=false evita erros de css)
ng build --prod --extract-css=false

2. Testar Projeto Compilado
cd dist/
python -m SimpleHTTPServer 8080

Google Chrome Dev Tools

Debugging Agular: Angular Augury A Google Chrome Dev Tools extension for debugging Angular 2 or + applications

Postman’s API Development Environment: Postman Through design, testing and full production, Postman is there for faster, easier API development—without the chaos.

Instalar Complementos

Instalar admin-lte npm install --save admin-lte is a fully responsive admin template. Based on Bootstrap 3 framework

Instalar font-awesome npm install --save font-awesome 675 pictographic icons for easy scalable vector graphics on websites

Instalar web-animations-js npm install --save web-animations-js API that provides Web Animation features in browsers that do not support it natively

Instalar intl npm install --save intl This specification provides the framework to bring long overdue localization methods to ECMAScript implementations

Instalar jquery npm install --save jquery jQuery is a fast, small, and feature-rich JavaScript library.

Instalar reflect-metadata npm install reflect-metadata A number of use cases (Composition/Dependency Injection, Runtime Type Assertions, Reflection/Mirroring, Testing) want the ability to add additional metadata to a class in a consistent manner.

Instalar ts-helpers npm install ts-helpers Typescript helpers for compiling typescript while specifying '--noEmitHelpers' within your 'tsconfig.json'.

Instalar json-server npm install -g json-server Created with <3 for front-end developers who need a quick back-end for prototyping and mocking.

Instalar jsonwebtoken npm install jsonwebtoken An implementation of JSON Web Tokens.

Instalar http-server npm install -g http-server is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.

Instalar nodemon npm install nodemon -g nodemon --watch backend backend/dist/server.js

Utilizando Git e GitHub

Após Instalar o Git:
git config --global user.name "Jean Alves"
git config --global user.email "[email protected]"

Gerar SSH Key
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Enter/Enter/Enter
cat id_rsa.pub

Add SSH Key
Clicar no Botão "New SSH Key"
Add Título e a Chave

Push Repositório Existente
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/jpralves10/meat-app.git
git remote -v
git push origin master

Git error: failed to push some refs to ...
git pull --rebase origin master
git push origin master

Status e Comitando:
git status
git commit -am "Arquivos comitados"
git log
git push origin master ou git push -f origin master

Comandos Uteis:
Atualizar Branch:
feature-H6182-T7008-T7009 >
git pull origin develop

Encontrar e Remover Artefato de Commit:
git reset --soft HEAD~[1..N] (exemplo)
git reset --soft HEAD~1
git rm -r src/main/resources/secure-credentials

Observações Importantes

Email Regex:
/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i

Number Regex:
/^[0-9]*$/

JSONView Validate and view JSON documents in Chrome

Gerar Certificado OpenSSL

Creating a SHA256 (SHA-1) self signed certificate for PingFederate

1. Generate certificate request using SHA256 (SHA-1) openssl> req -nodes -sha256 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3650 ... A challenge password []:openssl An optional company name []:openssl 2. Optional: Check to see if the CSR really has 256bit signatures openssl> req -in cert.csr -text -noout You should see “Signature Algorithm: sha256WithRSAEncryption” 3. Create the certificate openssl> req -x509 -days 365 -sha256 -in cert.pem -key key.pem -out my256.crt 4. Add my256.crt in GoogleChrome Chrome Settings > Show advanced settings > HTTPS/SSL > Manage Certificates

Use a SHA-2 instead of SHA-1 certificate in PingFederate

Gerar Certificado JDK

Passo 1

openssl s_client -connect {Host}:443
*Exemplo:
openssl s_client -connect des-apigateway-binint.mbi.cloud.ihf:443

Passo 2

*Copiar e colar no certificado.cer
do -----BEGIN CERTIFICATE-----
ate -----END CERTIFICATE-----

Passo 3

cd C:/Users/naejves/kitdev/jdk1.8.0_111/bin >
./keytool.exe -keystore C:/Users/naejves/kitdev/jdk1.8.0_111/jre/lib/security/cacerts
-import -alias DI4 -file C:/Users/naejves/Desktop/Squad/cacerts/di4.cer

Senha keystore: changeit

Passo 4

Confiar neste certificado? [n$o]: s

Passo 5

*Listar os certificados adicionados:
./keytool.exe -list -keystore C:/Users/naejves/kitdev/jdk1.8.0_111/jre/lib/security/cacerts | grep DI4
*ou
./keytool.exe -list -keystore C:/Users/naejves/kitdev/jdk1.8.0_111/jre/lib/security/cacerts

Créditos

jpralves all rights copyright@

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •