You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,6 @@ Want to install quickly? Use the [CLI](https://github.com/reactql/cli) - it does
34
34
- Full route-aware [server-side rendering (SSR)](https://reactql.org/docs/ssr) of initial HTML
35
35
- Universal building - both browser + Node.js web server compile down to static files
36
36
- Per-request Redux stores. Store state is dehydrated via SSR, and rehydrated automatically on the client
37
-
- HTTP header hardening with [Helmet for Koa](https://github.com/venables/koa-helmet)
38
37
- Declarative/dynamic `<head>` section, using [react-helmet](https://github.com/nfl/react-helmet)
39
38
- Full page React via built-in `<Html>` component - every byte of your HTML is React!
40
39
- Run plain HTTP and SSL from the same port - just `config.enableSSL(sslOptions)` in your app code
@@ -44,6 +43,7 @@ Want to install quickly? Use the [CLI](https://github.com/reactql/cli) - it does
44
43
-[Hot code reloading](http://gaearon.github.io/react-hot-loader/); zero refresh, real-time updates in development
45
44
- React + Redux state preservation on hot reloading, to avoid interrupting your dev flow
46
45
-[Development web server](https://reactql.org/docs/setup#development) that automatically rebuilds and restarts on code changes, for on-the-fly SSR testing with full source maps
46
+
- Hot code reload works inside Docker too! Just `docker-compose -f docker-compose.dev.yml`
47
47
48
48
### Code optimisation
49
49
@@ -70,19 +70,22 @@ Want to install quickly? Use the [CLI](https://github.com/reactql/cli) - it does
70
70
- Add GET|POST|PUT|PATCH|DELETE routes - auto-injected with Koa context and the per-request Redux store
71
71
- Add a custom 404 handler
72
72
- Enable/disable POST body parsing, along with custom options
73
+
- Enable/disable HTTP hardening
74
+
- Mount your front-end assets anywhere (like a CDN) with a dynamic `<base>` tag handling ([React Helmet](https://github.com/nfl/react-helmet) compatible)
73
75
74
76
### Production-ready
75
77
76
78
-[Production bundling](https://reactql.org/docs/bundling/production), that generates optimised server and client code
77
79
-[Static bundling mode](https://reactql.org/docs/bundling/static) for hosting your full app on any static host -- Github pages, S3, Netlify, etc
78
80
-[Static compression](https://webpack.js.org/plugins/compression-webpack-plugin/) using the [Zopfli Gzip](https://en.wikipedia.org/wiki/Zopfli) and [Brotli](https://opensource.googleblog.com/2015/09/introducing-brotli-new-compression.html) algorithms for the serving of static assets as pre-compressed `.gz` and `.br` files (default `vendor.js.bz` goes from 380kb -> 89kb!)
81
+
- Automatic HTTP hardening against common attack vectors via [Koa Helmet](https://github.com/venables/koa-helmet) (highly configurable)
79
82
- Easily extendable [webpack-config](https://fitbit.github.io/webpack-config/) files, for modular Webpack tweaks
80
83
-[Docker](https://www.docker.com/) support, with an optimised `Dockerfile` out-the-box
81
84
82
85
### Developer support
83
86
84
87
-[ESLint v3](http://eslint.org/)ing based on a tweaked [Airbnb style guide](https://github.com/airbnb/javascript)
85
-
-[Jest](https://facebook.github.io/jest/) test runner
88
+
-React and Babel compatible [Jest](https://facebook.github.io/jest/) test runner, pre-configured
86
89
-[Node Inspector](https://nodejs.org/en/docs/inspector/) support for SSR in dev mode - remotely debug the server, set breakpoints, inspect the stack from within Chrome
87
90
- Tons of code commentary to fill you in on what's happening under the hood
@@ -104,7 +107,7 @@ Then run `npm start` in the project root, and away you go!
104
107
105
108
## Docker
106
109
107
-
A[Dockerfile](https://github.com/reactql/kit/blob/master/Dockerfile) is included, that will build, optimise and bundle a production-mode ReactQL web server, your static assets and client-side code -- making it trivial to deploy to production.
110
+
An Alpine-based[Dockerfile](https://github.com/reactql/kit/blob/master/Dockerfile) is included, that will build, optimise and bundle a production-mode ReactQL web server, your static assets and client-side code -- making it trivial to deploy to production.
108
111
109
112
Build as normal with:
110
113
@@ -116,6 +119,13 @@ Then run with:
116
119
117
120
Navigating to http://<docker_host>:4000 will yield the ReactQL project code.
118
121
122
+
You can also run with Docker Compose:
123
+
124
+
`docker-compose -f docker-compose.dev.yml up`
125
+
126
+
This will build and spawn a development environment on ports 8080 and 8081. Just like your local dev environment, both browser hot code reloading and SSR auto-restarting will work on local code changes -- even inside the Docker stack!
127
+
128
+
(You can also spawn a production-grade environment with `docker-compose up`, using the default [docker-compose.yml](https://github.com/reactql/kit/blob/master/docker-compose.yml))
0 commit comments