React.js app with Express backend- Takes in user input, and tweets it from one central account.
MIT License
See the deployed version of this web app here! https://weetweet.herokuapp.com/
First install Brew and Yarn (if needed):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install yarn
Install nodemon globally
npm i nodemon -g
Install server and client dependencies
yarn
cd client
yarn
To start the server and client at the same time (from the root of the project)
yarn dev
Running the production build on localhost. This will create a production build, then Node will serve the app on http://localhost:5000
NODE_ENV=production yarn dev:server
The key to use an Express backend with a project created with create-react-app
is on using a proxy. We have a proxy entry in client/package.json
"proxy": "http://localhost:5000/"
This tells Webpack development server to proxy our API requests to our API server, given that our Express server is running on localhost:5000