Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amannn/react-static-website
A boilerplate for a static website built with React.
https://github.com/amannn/react-static-website
Last synced: 18 days ago
JSON representation
A boilerplate for a static website built with React.
- Host: GitHub
- URL: https://github.com/amannn/react-static-website
- Owner: amannn
- Created: 2016-01-03T00:01:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-03T21:43:37.000Z (almost 9 years ago)
- Last Synced: 2024-10-06T03:41:35.139Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-static-website
A boilerplate for a static website built with React.This template is intended to be very basic, making it easy to understand for beginners.
## Development
### Setup
1. Install node.js.
2. Install an editor that accepts eslint (e. g. [Atom](https://atom.io/) with the plugin [linter-eslint](https://atom.io/packages/linter-eslint)), so you get warnings about syntax or code style errors.
3. Install dependencies with `npm install`.### Run
1. Start the development server with `npm run dev`.
2. Check the console to see the URL the server runs on.## Use in production
### Setup
1. Install node.js ([Ubuntu](https://github.com/nodesource/distributions#deb))### Build
1. Build the app with `npm run build`.
2. Find the built files in the folder `dist`. Upload them to the root folder of a web server that can serve static files.You can test the built files by navigating to `dist` and run `python -m SimpleHTTPServer`. Then open the shown URL in the browser.
Every route (e.g. `/about`) contains all the prerendered HTML code and loads the rest of web site with the JavaScript code. Therefore subsequent route changes will load instantly without communication with the server.