Skip to content

z0r0132/react-weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Weather App

Build Status Coverage Status

Basic weather app with React + Redux and material-ui framework + ESLint

Demo

Table of Contents

  1. Installation
  2. Running the Project
  3. Building for Production
  4. Testing
  5. Project Structure
  6. Deployment

Installation

React Weather App is built and tested with Yarn. Please follow their install instructions to get Yarn installed on your system.

Then, run these commands:

git clone https://github.com/brijesh-pant/react-weather-app.git
cd react-weather-app
yarn install

Run

# serves app at localhost:3000
$ yarn start

Build

# builds the application to ./dist
$ yarn build

Test

# runs test in watch file mode
$ yarn test

Project Structure

.
├── build                    # All build-related code
├── public                   # Static public assets (not imported anywhere in source code)
│   ├── index.html           # Main HTML page container for app
├── src                      # Application source code
│   ├── index.js             # Application bootstrap and rendering
│   ├── actions              # redux actions to be used for state management
│   ├── components           # Global Reusable Components
│   │   ├── index.js         # Components definition
│   │   ├── index.test.js    # Unit tests
│   │   ├── styles.js        # material ui based components styles
│   ├── constants            # redux action type constants
│   ├── containers           # Global Reusable Container Components
│   │   ├── index.js         # Container Components definition
│   │   ├── index.test.js    # Container Components test suite
│   ├── hooks                # Custom hooks for functional code
│   ├── layouts              # Components that dictate major page structure
│   │   └── MainLayout       # Global application layout in which to render routes
│   ├── selectors            # reusable selectors for derived redux state data
│   ├── store                # Redux-specific pieces
│   │   ├── index.js         # Create and instrument redux store
│   │   └── reducers         # Reducer registry and injection
│   ├── utils                # Utility and helper functions

Deployment

Out of the box, this app is deployable by serving the ./dist folder generated by yarn build. The simplest deployment strategy is a static deployment.

Static Deployments

Serve the application with a web server such as express by pointing it at your ./dist folder. Make sure to direct incoming route requests to the root ./dist/index.html file so that the client application will be loaded.

This project was generated with create-react-app