nextjs-api-fetch-example
Small boilerplate demonstrating a simple microservice that fetches data from an open web api and renders react components on both server and client side using next.js.
Part of my presentation at DevTeach Montreal 2017.
Open placeholder API
We're using a /posts
endpoint provided by the http://jsonplaceholder.typicode.com/ service that provides placeholder data.
Running as a Docker container
Create Docker image
docker build -t nextjs-api-fetch-example:latest .
Run
docker run --name nextjs-api-fetch-example-01 -d -p 3000:3000 nextjs-api-fetch-example:latest
License
MIT © 2017 Ruy Adorno