A simple React front end application using the Google News API.
Sample application deployed on Heroku: https://react-google-news.herokuapp.com
Configured with Node Package Manager, Webpack, and Babel.
Uses webpack-merge to separate development and production builds, but keep common configuration. Also configured for hot reloads in the Express server, so Webpack will rebuild when changes are made.
An Express back end is used to make API requests and protect the API key. Configure API key locally with dotenv. For production, set an environment variable manually (through command line: NODE_ENV=production, API_KEY=...).
Implements Bootstrap via Reactstrap. Makes front end API calls with fetch.
npm run build
- Use Webpack to build for production.
npm run start
- Run the Express server via Node.
npm run dev
- Build for development and run Express server.
Node Package Manager (NPM) is used for dependencies. To install the application locally, follow these instructions:
- Install Node.js. NPM comes packaged with it.
- Run
npm install
in the command line while in the project directory. It will install dependencies from the package.json file. - To build for development and run the local dev server at http://localhost:5000, run
npm run dev
. It will run the Node/Express application in the server.js file.
This project is open source under the terms of the MIT License.