This is a single-page React application that displays random data fetched from a specified API. By default, it fetches and displays images from Unsplash, but it can also be configured to fetch data from other APIs.
- Random image fetch from Unsplash or data from other APIs
- Maintain the fetched data in a stack
- Flexibility to select the fetcher function via environment variables
- Node.js
- npm or yarn
- An API key from Unsplash (if you're using the Unsplash fetcher)
- Clone the repo
git clone https://github.com/vivasa/data-stack.git
- Install NPM packages
npm install
- Enter your API key in
.env(if you're using the Unsplash fetcher)REACT_APP_UNSPLASH_ACCESS_KEY = 'Enter Your API';
- Specify the fetcher function in
.env(if you want to use a fetcher other than the Unsplash fetcher)REACT_APP_FETCHER_FUNCTION_NAME = 'Enter the fetcher function name';
After installing the dependencies and setting up your Unsplash API key (if needed), you can start the app by running:
npm startThen open http://localhost:3000 to view it in the browser.
Images are provided by Unsplash.