Learn from Coder Coder (YT)
See Demo: retro-image-generator
- Setting up package.json
- nodemon.io
- Express.js
- dotenv
- node-fetch
- UnsplashAPIs Create an .env.local file on the root of the project and put your API key
CLIENT_ID=your_api_key_here
You must have your own API from Unsplased
$ git clone https://github.com/yossdev/image-generator-from-api.git
$ cd image-generator-from-api
$ npm run dev
Your app should now be running on localhost:3000.
- Set up website files and local Express.js site
- Set up route in Node.js to load API data using fetch()
- Use asynchronous JavaScript to get JSON data from server-side to client
- Dynamically generate image tag using JavaScript
- How to keep your API key secure using dotenv
- Style the website with CSS
$ heroku create
$ git push heroku master
$ heroku open