Amazon SNS

Amazon Simple Notification Service (Amazon SNS) is a managed service that provides message delivery from publishers to subscribers (also known as producers and consumers). Publishers communicate asynchronously with subscribers by sending messages to a topic, which is a logical access point and communication channel. Clients can subscribe to the SNS topic and receive published messages using a supported endpoint …

postman pre-script

Most developers are using post-man to check REST apis. Post-man is providing a lot of functionality. Pre-script is also one of them. We can define and update variables before send the request. it is useable to create a signature for REST api. https://learning.postman.com/docs/writing-scripts/pre-request-scripts/ You can check the guide. The script is based on javascript. So, …

How to use private package on github action

Github provides github action for CI/CD. For the CI, we could meet some cases to use private packages. In this case, npm run install will have permission problem. So, we need to set ssh agent. – name: Set ssh agent uses: webfactory/ssh-agent@v0.4.1 with: ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} Then it will work for a private repository. …

google oauth2 – googleapis

We can use googleapis npm to implement google oauth2 functionality.Main thing is to create new one by refresh token when access token is expired. Get authorization code from client. Get refresh token from authorization code. Add following code to generate access token automatically when it is expired oauth2Client.on(‘tokens’, (tokens) => {  if (tokens.refresh_token) {    // store the refresh_token in my database!    console.log(tokens.refresh_token);  }  console.log(tokens.access_token);});