Walkthrough Wednesdays with Jason Lengstorf: DEV API project using serverless
We talked Jamstack, serverless, and I got to have some fun and pair with Jason. We used Netlify's serverless functions to quickly set up an API to grab DEV posts with the DEV API, i.e. this repository.
Thanks again for coming on the stream Jason! 😎
Installation
- Install the Netlify CLI,
npm install netlify-cli -g
- Run
npm install
- Run
ntl dev
- A browser will open at http://localhost:8888 with a message saying "Not Found". That's OK. 😅
- Navigate to http://localhost:8888/api/posts. A list of posts from DEV will load.
Play with the API
- Load posts for a specific user by adding their username to the API call, e.g. http://localhost:8888/api/posts/nickytonline
- Fork this and have some fun!
Before and After Calling API with On-demand Builders Enabled
In this example we query the posts for DEV community member coffeecraftcode. The initial call comes…