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
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
| # block content | |
| location ~ ^/content/(.*).(txt|md|mdown)$ { | |
| rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect; | |
| } | |
| # block all files in the site folder from being accessed directly | |
| location ~ ^/site/(.*)$ { | |
| rewrite ^/site/(.*)$ /error redirect; | |
| } |
| ############################## | |
| ## Kirby configuration | |
| ############################## | |
| location /kirby/ { | |
| include /etc/nginx/mime.types; | |
| index index.php; | |
| root /var/www/addons88/; | |
| if (!-e $request_filename){ |
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
| /** | |
| * | |
| * Name v0.0.1 | |
| * Description, by Chris Ferdinandi. | |
| * http://gomakethings.com | |
| * | |
| * Free to use under the MIT License. | |
| * http://gomakethings.com/mit/ | |
| * | |
| */ |
| {% macro input(name, value, type, id, class) %} | |
| <input type="{{ type|default('text') }}" name="{{ name }}" id="{{ id|default(name) }}" value="{{ value|e }}" class="{{ class }}" /> | |
| {% endmacro %} | |
| {% macro textarea(name, value, class) %} | |
| <textarea name="{{ name }}" id="{{ id|default(name) }}" class="{{ class }}">{{ value|e }}</textarea> | |
| {% endmacro %} | |
| {% macro label(id, content, class) %} | |
| <label for="{{ id }}" class="{{ class }}">{{ content|e }}</label> |
| Homebrew server setup |
| I modified the source code of socket.io-client/socket.io.js 1.0.6 | |
| line 3387: | |
| return schema + '://' + this.hostname + port + this.path + query; | |
| Changed to: | |
| return schema + '://' + this.hostname + port + this.path + 'ws/' + query; | |
| And my ProxyPass config: |
| #!/usr/bin/env bash | |
| set -u | |
| set -e | |
| export GIT_WORK_TREE="/var/www/example.com" | |
| export NODE_VERSION="0.10" | |
| echo "--> Checking out..." | |
| git checkout -f |
| /** @jsx React.DOM */ | |
| var STATES = [ | |
| 'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', | |
| 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', | |
| 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', | |
| 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY' | |
| ] | |
| var Example = React.createClass({ |