react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
| 'use strict'; | |
| var babel = require('babel-core'); | |
| var fs = require('fs'); | |
| // borrowed from https://github.com/babel/babel-jest/blob/master/index.js | |
| require.extensions['.jsx'] = function (module, filename) { | |
| var src = fs.readFileSync(filename, 'utf8'); | |
| // Allow the stage to be configured by an environment | |
| // variable, but use Babel's default stage (2) if |
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
Custom recipe to get full Node.js Cloud Environment in DigitalOcean Dokku droplet running from scratch. Yes. Your own Heroku for $5 per month.
I use this gist to keep track of the important configuration steps required to have a functioning system after fresh install.
When you have executed that's all step by step you will get a new working and stable system which is ready to host & serve your Node.js application and databases.
Creating an OAuth2 server is not a task that should be taken lightly. There are many security loopholes that could be exploited, and regular examinations are critical to handle possible vulnerabilities.
Auth is an authentication microservice based on the OAuth2 identity delegation protocol.
| /* eslint no-console:0 */ | |
| const https = require('https'); | |
| module.exports = function sauce(callback) { | |
| const currentTest = this.client.currentTest; | |
| const username = this.client.options.username; | |
| const sessionId = this.client.capabilities['webdriver.remote.sessionid']; | |
| const accessKey = this.client.options.accessKey; | |
| if (!this.client.launch_url.match(/saucelabs/)) { |
| import React, { Component } from 'react' | |
| import Subapp from './subapp/Root' | |
| class BigApp extends Component { | |
| render() { | |
| return ( | |
| <div> | |
| <Subapp /> | |
| <Subapp /> | |
| <Subapp /> |
| { | |
| "AWSEBDockerrunVersion": "1", | |
| "Image": { | |
| "Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>", | |
| "Update": "true" | |
| }, | |
| "Ports": [ | |
| { | |
| "ContainerPort": "443" | |
| } |
| files: | |
| "/tmp/45_nginx_https_rw.sh": | |
| owner: root | |
| group: root | |
| mode: "000644" | |
| content: | | |
| #! /bin/bash | |
| CONFIGURED=`grep -c "return 301 https" /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf` |
We prefer to have audit logging in our services that leverage databases. It gives us clarity into sources of where ACL issues might originate as well as gives us a general timeline of activity in our application.
Audit logging is tedious to set up so this gist contains our latest iteration of audit logging support for a sequelize based service.
| files: | |
| "/etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf": | |
| mode: "000755" | |
| owner: root | |
| group: root | |
| content: | | |
| server { | |
| listen 80; | |
| gzip on; |