Skip to content

jason102/photo-browser

Repository files navigation

Unsplash photo browser app

This is a demo app written using TypeScript/React/Vite that allows the user to browse Unsplash photos using the Unsplash Photo API.

Running the app locally

  1. In the root directory of the project run npm install to install the dependencies.
  2. Create a .env.local file in the root directory and add the following environment variable with your local testing Unsplash API access key (replace XXXXXXX):
VITE_UNSPLASH_ACCESS_KEY=XXXXXXX
  1. Run npm run dev to run the app on localhost. The app should be available at the default Vite server port at http://localhost:5173/

Building the app for production

  1. Create a .env.production file in the root directory of the project and specify your production environment Unsplash API key the same way the .env.local file was configured.
  2. Build the app using npm run build. The files in the generated dist directory can be uploaded to your hosting provider.

Running the test cases

Run npm run test to run some example test cases using Vitest and React Testing Library.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published