Hello, World with ReactJS in 8 Easy Steps: From Local Windows Development Machine to Live Production Server

This dev tip is brought to you by the developer of MoneyPhone: Personal Expense Tracking for Android and iOS. Consistently spend less than you earn each month and get your finances under control when you start monitoring your expenses with MoneyPhone!

Hello There Dear Internet Friend,

This post is mainly for my own personal reference, but maybe it might be of some help to someone else out there on the ole interwebs as well. So let’s begin. 8 easy steps to creating a ReactJS app on Windows 10 (assumes you have already installed node.js) =>

  1. Fire up the command prompt and navigate to your Desktop directory
    $ cd Desktop
  2. Use create-react-app to generate a new React project
    $ npx create-create-app hello-react
  3. Navigate to your new project directory
    $ cd hello-react
  4. User npm to start your development server
    $ npm start
  5. Edit src/App.js and save to reload changes
  6. CTRL-Break and enter ‘y’ to ‘terminate batch job’ if you’d like to stop the development server
  7. Build your app for production using npm
    $ npm run build
  8. Last, upload the file from the build folder to your server with ftp and FileZilla, or using a more modern method if you so choose, when your ready for your app to go live on the world wide web. Happy hacking!
 

topherPedersen