Discussion Security

A method to block CORS attacks.

Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell a browser to let a web application running at one origin (domain) have permission to access selected resources from a server at a different origin. A web application executes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, and …

React.js

qrcode.react – A React component to generate QR codes.

qrcode.react will pass through any additional props to the underlying DOM node (<svg> or <canvas>). This allows the use of inline style or custom className to customize the rendering. One common use would be to support a responsive layout. Note: In order to render QR Codes in <canvas> on high density displays, we scale the canvas element to contain an appropriate number of pixels and …

Backend Discussion Frontend Javascript NodeJS

Managing node.js project with multiple packages using lerna.js

Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and npm. Splitting up large codebases into separate independently versioned packages is extremely useful for code sharing. However, making changes across many repositories is messy and difficult to track, and testing across repositories gets complicated really fast. To solve these (and many other) …

Backend Database Discussion

Yet another way to manage db migrations in node.js project

Using Sequelize with node.js project is great, which provides all in one pack functionalities, including migrations, ORMs, etc. Sometimes, we only need migrations without ORMs. ex: using direct GraphQL libraries to make interface. db-migrate is database migration framework for node.js. Usage is simple, install via npm, similar to sequelize.

3rd Party Services

Standard Library(stdlib.com) and Slack Bot Development

Standard Library is an all-in-one API development, management and hosting solution that lets you build integrations — Slack apps, Stripe webhooks, you name it — in minutes instead of days. Perfect for cross-functional teams, always powered by code. When you develop slack bot, you need to use stdlib.com as API provider. So, your slack bot …