Git Product home page Git Product logo

react-app-starter's Introduction

README

react-app-starter is a simple ('Dockerized') React app skeleton.

Fork and modify this project as a time-saving and easy to understand starter for your own new React project.

Quick Start

$ git clone https://github.com/hfagerlund/react-app-starter.git
$ cd react-app-starter
$ yarn install
$ yarn run build
$ yarn run start
# browser automatically opens to http://localhost:8080/build/home.html

Using Docker

# start Docker
$ sudo systemctl start docker

# build the image
## important - 'build' must not be listed in .dockerignore (else will fail)
$ sudo docker build . -t my-react-app -f Dockerfile

# list all images
$ sudo docker images

# run the container
$ sudo docker run -p 8000:80 my-react-app

# browse to http://localhost:8000/home.html

๐ŸŽ‰

What's going on here?

  • React, react-dom - These libraries are installed using npm, the package manager for Node.js: $ npm i -S {react,react-dom}
  • Babel - Compiles JSX into JavaScript (for rendering in the browser);
  • JSX - A syntax extension to JavaScript used for creating React 'elements';
  • Webpack - Module bundler (ie. runs the code through Babel etc.);
    • HTML Webpack Plugin - Generates an HTML file to render the generated bundle.js file in the browser;
  • Docker - The entire app is both built (using Yarn) and deployed (to NGINX) inside Docker.

(All copyrights for the above remain with their respective owners.)


License

Copyright (c) 2019 Heini Fagerlund. Licensed under the BSD-3-Clause license.

react-app-starter's People

Contributors

dependabot[bot] avatar hfagerlund avatar

Watchers

 avatar  avatar  avatar

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.