This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.
The following commands download data into json files and place them into the ./data directory:
yarn load-instructorsOther types of data can also be downloaded by following that pattern:
See the egghead v1 API for available "types":
https://egghead.io/api/v1/${type}
yarn load-lessons
yarn load-series- Utilities in
./libread the json files from the./datadirectory (see./lib/courses.js) - Routes access these utilities to load the json data (see
./pages/courses.js) - The [https://nextjs.org/docs/basic-features/data-fetching#getstaticpaths-static-generation](
getStaticPathsstatic function) pre-renders pages with the data (again, see./pages/courses.js)