Example Case use for ReactJS with Python Flask
upstream BackEnd {
ip_hash;
server 127.0.0.1:8085;
# port untuk applikasi backend
}
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:
| { | |
| "extends": [ | |
| "eslint:recommended", | |
| "google", | |
| "plugin:react/recommended" | |
| ], | |
| "parser": "babel-eslint", | |
| "parserOptions": { | |
| "ecmaFeatures": { | |
| "jsx": true, |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| # don't forget chmod +x .git/hooks/pre-commit | |
| STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
| ESLINT="$(git rev-parse --show-toplevel)/node_modules/.bin/eslint" | |
| if [[ "$STAGED_FILES" = "" ]]; then | |
| exit 0 | |
| fi |
| /** | |
| * My Gulp Purify && PurgeCSS | |
| * @ri7nz | |
| * don't forget, install save-dependencies | |
| * $ npm install --save gulp gulp-purifycss gulp-purgecss gulp-postcss | |
| */ | |
| var gulp = require('gulp'); | |
| var purifycss = require('gulp-purifycss'); | |
| var purgecss = require('gulp-purgecss'); |
| { | |
| "short_name": "My App // Should be <= 12 characters. Appears on the home screen once installed ", | |
| "name": "My App // Must be <= 45 characters. Appears in places with more space (install dialogs, etc.)", | |
| "icons": [{ | |
| "src": "images/splashIcon.png // Android: Requires a PNG at least 512x512 for your startup screen. This is used along with your app name (above) and background color (below) to generate a splash screen. Learn more: https://developers.google.com/web/fundamentals/web-app-manifest/#add_a_splash_screen", | |
| "sizes": "512x512", | |
| "type": "image/png" | |
| }, { | |
| "src": "images/appIcon.png // Android requires a PNG at least 192x192 for your home screen icon", | |
| "sizes": "192x192", |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <!-- The usual suspects --> | |
| <meta charset="utf-8"> | |
| <meta name="description" | |
| content="My app is awesome because..."> | |
| <title>My awesome app</title> | |
| <link rel="shortcut icon" |