Testing the Unsplash API
Install Git, the free and open source distributed version control system.
Install Node.js which includes Node Package Manager.
Install Yarn Package Manager.
Run git clone [email protected]:orbanszlrd/unsplash-demo.git
to clone the repository from GitHub.
Run yarn install
or npm install
to install the dependencies.
Run yarn dev
or npm run dev
for a dev server.
Navigate to http://localhost:3000
The app will automatically reload if you change any of the source files.
Run yarn build
or npm run build
to build the project.
Run yarn start
or npm run start
to start the app.
Navigate to http://localhost:3000
- Push the latest changes to the repository where the app is hosted
- Update the checked out branch
- Create a new Node.js application
- Copy the .next folder in the root directory of the app
- Install the dependencies
- Configure the environment variables
- Start the app
- Enjoy
- Delete the custom server file:
server.js
- Revert the the
start
script in thepackage.json
to its initial value,next start
In order to use the Unsplash API, you need to have a Developer Account on Unsplash.
- Create a Developer Account on Unsplash
- Create a New Application
- Generate a Token as described in the Unsplash Documentation
- Open the
.env
file and set the value of theUNSPLASH_TOKEN
variable to the newly generated Token
React - Getting Started
Next.js - Documentation
Vercel - Documentation
Unsplash Developers - Documentation
Unsplash Developers - User Authentication Workflow