Awesome
<h1 align="center">Razzle Material-UI Styled Example</h1> <p align="center"> <a title="Node.js" href="https://nodejs.org/en/"><img alt="Node.js" src="https://camo.githubusercontent.com/9c24355bb3afbff914503b663ade7beb341079fa/68747470733a2f2f6e6f64656a732e6f72672f7374617469632f696d616765732f6c6f676f2d6c696768742e737667" width="104.49" height="64"></a> <a title="Yarn" href="https://yarnpkg.com/lang/en/"><img alt="Yarn" src="https://raw.githubusercontent.com/yarnpkg/assets/master/yarn-kitten-full.svg?sanitize=true" width="142.708" height="64"></a> <a title="Razzle" href="https://github.com/jaredpalmer/razzle"><img alt="Razzle" src="https://cloud.githubusercontent.com/assets/4060187/26326651/1fc65eca-3f0a-11e7-9f45-02c2bf950418.png" width="222.813" height="64"></a> <a title="Express" href="https://expressjs.com/"><img alt="Express" src="https://cdn.worldvectorlogo.com/logos/express-109.svg" width="219.771" height="64"></a> </p> <p align="center"> <a title="React" href="https://facebook.github.io/react/"><img alt="React" src="https://cdn.worldvectorlogo.com/logos/react.svg" width="267.135" height="240"></a> <a title="Styled Components" href="https://www.styled-components.com/"><img alt="Styled Components" src="https://raw.githubusercontent.com/styled-components/brand/master/styled-components.png" width="240" height="240"></a> <a title="Material-UI" href="http://www.material-ui.com/#/"><img alt="Material-UI" src="https://cdn.worldvectorlogo.com/logos/material-ui.svg" width="295.417" height="240"></a> </p> <p align="center"> <br><a title="GitPunch" href="https://gitpunch.com/"><img alt="GitPunch" src="https://raw.githubusercontent.com/vfeskov/gitpunch/master/client/src/big-logo.png" width="222" height="52"></a> <br>⭐ Star and get notified about new releases via email. </p>Features
- <a title="Razzle" href="https://github.com/jaredpalmer/razzle"><img alt="Razzle" src="https://cloud.githubusercontent.com/assets/4060187/26326651/1fc65eca-3f0a-11e7-9f45-02c2bf950418.png" width="" height="18"></a>
- Server Side Rendering
- Hot Module Replacement for both client and server side <a title="React" href="https://facebook.github.io/react/"><img alt="React" src="https://cdn.worldvectorlogo.com/logos/react.svg" width="" height="18"></a>React components
- Up to date JavaScript (ECMAScript 6 (2015)) support
- Single route static site generation
- <a title="Express" href="https://expressjs.com/"><img alt="Express" src="https://cdn.worldvectorlogo.com/logos/express-109.svg" width="" height="18"></a> server with gzip compression
- HTML and inline CSS and JS minification with HTMLMinifier
- <a title="Styled Components" href="https://www.styled-components.com/"><img alt="Styled Components" src="https://raw.githubusercontent.com/styled-components/brand/master/styled-components.png" width="18" height="18"></a> Styled Components
- <a title="Material-UI" href="http://www.material-ui.com/#/"><img alt="Material-UI" src="https://cdn.worldvectorlogo.com/logos/material-ui.svg" width="" height="18"></a> Material-UI
Getting Started
- Initial steps
- Install <a title="Node.js" href="https://nodejs.org/en/"><img alt="Node.js" src="https://camo.githubusercontent.com/9c24355bb3afbff914503b663ade7beb341079fa/68747470733a2f2f6e6f64656a732e6f72672f7374617469632f696d616765732f6c6f676f2d6c696768742e737667" width="" height="18"></a> and <a title="Yarn" href="https://yarnpkg.com/lang/en/"><img alt="Yarn" src="https://raw.githubusercontent.com/yarnpkg/assets/master/yarn-kitten-full.svg?sanitize=true" width="" height="18"></a>.
- Download or clone this repository.
- Open a command prompt in the project folder.
Install dependencies:
yarn install
Start the server:
yarn start
This command initiates a build process and starts the server in production mode.
Visit http://localhost/ to access the web application.
Development
Start the server in development mode:
yarn dev
Single route static site generation
Generate a static site:
yarn static
Open the index.html
within the static
folder to access the web application. The folder name can be modified with the RAZZLE_STATIC_PATH
environment variable.
Idea behind the example
This project is based on the basic razzle example. This repository also satisfies the following 2 entry points requred by Razzle:
src/index.js
for the serversrc/client.js
for the browser