Demo project to learn and create an example Next.js project. The project consists of two parts: frontend and backend.
- Node.js and Express.js for backend
- Next.js for frontend
Project structure:
be folder for backend (Express.js app)
app root for backend app
fe folder for frontend (Next.js app)
app root for frontend app
- Backend Express.js app with two endpoints -
/posts
and/posts/[ID]
. - Frontend and Backend communincation over JSON API.
- Frontend Next.js app with index, posts, and post by ID pages.
- Two different implementation for Next.js pages:
- Static Generation - implementation of static generation functions (see
fe/app/pages/posts.js
andfe/app/pages/posts/[id].js
). - Server-Side Rendering - implementation of server-side rendering functions (see same files).
- Static Generation - implementation of static generation functions (see