An open API service indexing awesome lists of open source software.

https://github.com/kireerik/razzle-material-ui-styled-example

Razzle Material-UI example with Styled Components using Express with compression
https://github.com/kireerik/razzle-material-ui-styled-example

boilerplate compression example example-project express isomorphic material-ui razzle react react-dom server-side-rendering ssr styled-components template universal webpack

Last synced: 1 day ago
JSON representation

Razzle Material-UI example with Styled Components using Express with compression

Awesome Lists containing this project

README

          

Razzle Material-UI Styled Example


Node.js
       Yarn
       Razzle
       Express


React
       Styled Components
       Material-UI



GitPunch

⭐ Star and get notified about new releases via email.

## Features
- Razzle
- **S**erver **S**ide **R**endering
- **H**ot **M**odule **R**eplacement for both client and server side React[React](https://facebook.github.io/react/) components
- Up to date JavaScript ([**E**CMA](https://en.wikipedia.org/wiki/Ecma_International)**S**cript 6 (2015)) support
- Single route static site generation
- Express server with gzip [compression](https://github.com/expressjs/compression)
- HTML and inline CSS and JS minification with [HTMLMinifier](https://github.com/kangax/html-minifier)
- Styled Components [Styled Components](https://www.styled-components.com/)
- Material-UI [Material-UI](http://www.material-ui.com/#/)

## Getting Started
- Initial steps
- Install Node.js and Yarn.
- [Download](https://github.com/kireerik/razzle-material-ui-styled-example/archive/master.zip) or [clone](github-windows://openRepo/https://github.com/kireerik/razzle-material-ui-styled-example) this repository.
- Open a command prompt in the project folder.

> Install dependencies:
> ```shell
> yarn install
> ```

Start the server:
> ```shell
> 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:
```shell
yarn dev
```

### Single route static site generation
Generate a static site:
```shell
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](https://github.com/jaredpalmer/razzle/tree/master/examples/basic). This repository also satisfies the following 2 entry points requred by Razzle:
- `src/index.js` for the server
- `src/client.js` for the browser