adhocteam / nytimes-library

A collaborative documentation site, powered by Google Docs.
https://nyt-library-demo.herokuapp.com/
Apache License 2.0
1 stars 1 forks source link

React Experimental (abandoned) #26

Closed zenkimoto closed 2 years ago

zenkimoto commented 2 years ago

Description of Change

This is the initial set up React in the Content Library. Would like some feedback on the project set up.

I created a /react folder where all the react stuff lives. When you start up: npm run watch, it will now load both Express and React. I didn't change the old Express port so you can still access all the old stuff in localhost:3000. The React stuff is on localhost:3001.

I created a build step on the React project that will copy the stuff over to the Express /public folder. If you want to try, just do this:

  1. cd react
  2. yarn build -> Copies the react build output to ../public
  3. cd .. && npm run watch
  4. Go to: http://localhost:3000/index.html <- The build output of React will be copied here.

Related Issue

Motivation and Context

Checklist