debug typescript mocha and server in vscode

We recently are developing a graphql api using apollo server and Typeorm on top of Aws Lambda. Code-wise is kind of straightforward with schema defined, then resolvers then service layer then dao layer then model defined typeorm with its annotations/decorators. However there are 2 issues related to debugging, unit test and run graphql local. unit…

aws cli ProfileNotFound

I was trying to do some KMS encryption for some of our prod credentials with aws cli. After pulling down the temporary aws sts token for prod roles and run the aws –profile SOME_PROD_ROLE kms encrypt xxx, the  botocore.exceptions.ProfileNotFound: The config profile (SOME_DEV_ROLE) could not be found constantly pop up. I checked the ~/.aws/credentails file and make…

href # does not always do nothing

Today we were facing an issue that the angular universal generates an anchor element with href=”false” so before the js is loaded, the anchor would lead user to /false. My first thought is to just put a href=”#’ so that it does nothing. Our url is something like http://www.c1.com/local. After adding the #, the click always navigate…

npm git private repo auth

Our enterprise Github recently made a change so all anonymous access from work laptop are blocked. This causes problem as we have some private repo dependencies in our package.json like below: dependencies { … “sun”: “git+https://github.kdc.capitalone.com/NeX/sun-ng2-nex.git”, … } Whenever I try to do npm install, it gives me authentication error. I can get it installed…