Install Babun http://babun.github.io/
Install Hyper http://hyper.is/
Download Fira Code font https://github.com/tonsky/FiraCode
| /** | |
| * Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
| * It was requested to be introduced at as part of the jsonwebtoken library, | |
| * since we feel it does not add too much value but it will add code to mantain | |
| * we won't include it. | |
| * | |
| * I create this gist just to help those who want to auto-refresh JWTs. | |
| */ | |
| const jwt = require('jsonwebtoken'); |
| FROM node:10.15.3-alpine | |
| WORKDIR /opt | |
| ENV NODE_ENV=development | |
| ENV HOST=localhost | |
| ENV PORT=8000 | |
| ENV MONGO_URL=mongodb://localhost:27017/sample-service | |
| ENV RABBIT_URL=amqp://rabbit:rabbit@rabbitmq:5672/example |
| FROM node:10.15.3-alpine | |
| WORKDIR /opt | |
| ENV PORT=8000 | |
| ENV HOST=localhost | |
| ENV NODE_ENV=development | |
| ENV RABBIT_URL=amqp://rabbit:rabbit@localhost/comspaces | |
| ENV POSTGRES_URL=postgres://postgres:secret@localhost:5432/user-service | |
| ENV MONGO_URL=mongodb://mongodb-host:27017/user-service |
| const records = await eventColl | |
| .aggregate([ | |
| { | |
| $match: { | |
| company_id, | |
| soft_delete: false, | |
| }, | |
| }, | |
| { | |
| $sort: sortObj, |
Install Babun http://babun.github.io/
Install Hyper http://hyper.is/
Download Fira Code font https://github.com/tonsky/FiraCode
| /* eslint-env jest */ | |
| import _ from 'lodash' | |
| import path from 'path' | |
| import fs from 'fs' | |
| import callsites from 'callsites' | |
| import knex from 'knex' | |
| import hash from 'object-hash' | |
| import conf from '<conf>' | |
| // Get the db config. |
Summary: use good/established messaging patterns like Enterprise Integration Patterns. Don't make up your own. Don't expose transport implementation details to your application.
As much as possible, I prefer to hide Rabbit's implementation details from my application. In .Net we have a Broker abstraction that can communicate through a lot of different transports (rabbit just happens to be our preferred one). The broker allows us to expose a very simple API which is basically:
| import React, { PureComponent } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { Async } from 'react-select'; | |
| // UI. | |
| import { withStyles } from 'material-ui/styles'; | |
| import { FormControl } from 'material-ui/Form'; | |
| import { InputLabel } from 'material-ui/Input'; | |
| var elixir = require('laravel-elixir'); | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Elixir Asset Management | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Elixir provides a clean, fluent API for defining some basic Gulp tasks | |
| | for your Laravel application. By default, we are compiling the Sass | |
| | file for our application, as well as publishing vendor resources. |