Code Monkey home page Code Monkey logo

proyecto-web's Introduction

React Redux Base

CircleCI Dependency Status License

Commands

  1. Run the app. yarn start or npm start
  2. Build the app. yarn build or npm run build
  3. Lint the app. yarn lint or npm run lint
  4. Test the app. yarn test or npm run test
  5. Run the app with SSR. yarn ssr or npm run ssr

Getting Started

  1. Clone the repository
  2. Install dependencies: yarn or npm install
  3. Create the environment variables files in root folder(.env.dev, .env.staging and .env.prod):

.env.example example:

  API_URL=http://your-api-url.com
  CABLE_URL=wss://your-api-url.com/cable
  AWS_BUCKET=bucket
  AWS_REGION=region
  AWS_ACCESS_KEY_ID=key_id
  AWS_SECRET_ACCESS_KEY=secret_key
  1. Start the dev server: yarn start or npm start -s

Running script with different environments

To change the set of environment variables for a script it's needed to run ENV=my_environment before the script.

For example: ENV=staging yarn build

Initial Machine Setup

Install Node 7.0.0 or greater

Install Yarn - Fast, reliable, and secure package manager

Server Side Rendering

This base is already set up with a Node server for SSR.

The command yarn ssr will compile the server and client.

Fetching data

The server is prepared to fetch data directly from the backend before rendering the HTML.

Deploying to AWS S3

  1. Add the environment variables for each .env AWS_BUCKET, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
  2. Run the command to deploy with an environment ENV=your_environment yarn deploy

Deploying to Heroku

  1. Add all the environment variables in .env to Heroku
  2. Add the env variable NPM_CONFIG_PRODUCTION=false to Heroku
  3. Deploy your branch to Heroku

Technologies

Tech Description
React Fast, composable client-side components.
Redux Enforces unidirectional data flows and immutable, hot reloadable store. Supports time-travel debugging.
React Router 4 A complete routing library for React
Babel Compiles ES6 to ES5. Enjoy the new version of JavaScript today.
Webpack 4 Bundles npm packages and our JS into a single file. Includes hot reloading via React Hot Loader.
Express Fast, unopinionated, minimalist web framework for node.
Jest Automated tests with built-in expect assertions and Enzyme for DOM testing without a browser using Node.
ESLint Lint JS. Reports syntax and style issues. Using eslint-config-airbnb for the airbnb style guides.
SASS Compiled CSS styles with variables, functions, and more.
PostCSS Transform styles with JS plugins. Used to autoprefix CSS
Stylelint Modern CSS linter that helps you enforce consistent conventions and avoid errors in your stylesheets.
Redux React Session Keep your session sync with localStorage and Redux
ReduxForm Redux-form works with React Redux to enable an html form in React to use Redux to store all of its state.
Isomorphic Fetch Is a Promise-based mechanism for programatically making web requests in the browser.
Immutable.js Immutable persistent data collections for Javascript which increase efficiency and simplicity.

License

React Redux Base is available under the MIT license. See the LICENSE file for more info.

Credits

React Redux Base is maintained by Rootstrap with the help of our contributors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.