0

I'm new to yarn, nodejs and react apps. I've tried running the Sizzy app and it works on my local XAMPP server if I first run yarn start in the cmd terminal and then access via http://localhost:3033, but after a while I have to rerun the same command. I've tried yarn build and then navigating to the build directory but that just loaded a page with a header, it didn't have the same functionality. And the contents of the build directory looks very similar to the contents of the public directory anyway.

I've had a look at this SO post and this one but still unsure why I need to run yarn start everytime.

UPDATE:

I'm still not sure how node, react, and electron fit together and why each is required, much research and learning still to do! Rather than a 'react app' I believe I'm looking at an 'Electron app'. I think if I run the command npm run package-win then I think I should get an exe file and some dlls. But how to instead setup for running on an Apache web server without having to start using the command line, or would you just have to build it with different architecture?

Starting to get a vague understanding from reading this.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Nick W
  • 877
  • 2
  • 15
  • 30
  • the public directory is to keep static files like images, audio, and video files that your web page use. So, it should be the same as what your dev public folder contains. – Amila Senadheera Dec 29 '19 at 18:34

1 Answers1

0

If you used the npx create-react-app <app-name> then you just have to change the "start" script in the package.json file as "serve -s build". Run yarn add serve to add For deployment, Heroku is a good choice. Create a Heroku app and connect your git repo to the newly created app. Then go to the deploy tab and deploy your branch.

Amila Senadheera
  • 12,229
  • 15
  • 27
  • 43