Giter VIP home page Giter VIP logo

create-react-app-now's Introduction

create-react-app-now

Deploy React.js Static Web Apps generated with facebook/create-react-app to Zeit's awesome Now.sh service.

I wrote an article about this project here: Zero Configuration Deployment for React app with Zeit Now

Important

UPDATE: create-react-app now officially recommend using "serve" to deploy your create-react-app project. The documentation can be found here: https://create-react-app.dev/docs/deployment

I personally and strongly recommend you to check out Next.js by Zeit team. That will be my personal go to choice as well when creating new React project, and deploy to now seamlessly.

Though create-react-app-now can serves as an example on how you can use create-react-app and zeit's now together.

Having said that, it is likely that I will not actively maintain this repo anymore (e.g. update the dependencies). I will still accept PR though.

Why

create-react-app-now is created using facebook/create-react-app. Although it supports deployment to github pages and heroku, it does not feel intuitive just yet, as we need to run lots of commands.

This project is specifically to solve just that, with just 1 command: npm run deploy

This is achieved by using Zeit's awesome Now.sh service. It is fast, easy, and intuitive way of deploying your React app.

How

Simply follow this step from getting started to deployment:

$ npm install -g now
$ git clone https://github.com/xkawi/create-react-app-now
$ npm install
$ npm run deploy

First command installs the now cli globally as npm package. Another (or suggested) approach is to install Now Desktop to ensure automatic updates of now cli.

Subsequent commands simply clone this repo, install necessary npm packages and deploy it to Now.

Whenever you want to deploy new changes, just run npm run deploy again to get new public link, for free! ๐Ÿ˜„

You will enjoy all the benefits that Now offers out-of-the-box: real-time and immutable deployments all within 1 command.

Note

You might see some red text appears or warnings in the log. You can safely ignore this, because your project will still be deployed successfully.

Alternatives Deployment

If you prefer something else, please refer to create-react-app documentation here.

More

Read more about create-react-app here

Read more about Zeit's Now.sh here

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.