Today you will learn how to use:
- Latest Next.JS version 14
- Server / Client components
- Server actions (instead of API route handlers)
- Prisma (interacting with the database)
- Validate api response with zod
- Folder structure (page.tsx, loading.tsx, error.tsx)
- Dynamic routes
- Metadata, import fonts
Add all required environment variables. Look at .env.example
file.
Install dependencies:
npm install
Setup prisma
npx prisma generate
npx prisma migrate dev --name MigrationNameHere
Run the development server:
npm run dev
// Error example
const data = await prismadb.todoItem.update({
where: { id: "1" },
data: { name: "Neki" },
});
Internationalization with next-intl: https://next-intl-docs.vercel.app/docs/getting-started/app-router
Turbopack, server actions: https://nextjs.org/blog/next-14
-
Website - @skillupmentor
-
Github - @skillupmentor
-
LinkedIn - @nejcrogelsek
-
Github - @nejcrogelsek