Our great sponsors
-
As we're using NextJS, we need to select regular web applications. After creating the application, we should redirect to its settings page. Scroll down and edit the application URL as shown below, then save your changes. You can check auth0 next.js documentation here.
-
Do you have something to add to this project? kindly let me know. You can reach out to me via Twitter. If you like this project, kindly give it a star on GitHub. You can also check out the deployed app here.
-
Klotho
AWS Cloud-aware infrastructure-from-code toolbox [NEW]. Build cloud backends with Infrastructure-from-Code (IfC), a revolutionary technique for generating and updating cloud infrastructure. Try IfC with AWS and Klotho now (Now open-source)
-
Knowledge of React and JSX.
-
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction import { withApiAuthRequired ,getSession } from "@auth0/nextjs-auth0" import { deleteContact, getContact, updateContact } from "../../../models" export default withApiAuthRequired(async (req, res) => { const user = getSession(req, res).user if (req.method === 'PUT') { let contact = await updateContact( req.body, req.query.id ) res.status(201).json({ message: "Successfully updated contact", data: contact, status: 'ok' }) } else if (req.method === 'GET') { let contact = await getContact(req.query.id) res.status(200).json({ message: "Successfully retrieved contact", data: contact, status: 'ok' }) } else if (req.method === 'DELETE') { let contact = await getContact(req.query.id) if (contact.user.id !== user.sub) { return res.status(403).json({ message: "Forbidden", status: false, data: null }) } contact = await deleteContact(req.query.id) res.status(200).json({ message: "Successfully deleted contact", data: contact, status: 'ok' }) } else { res.status(405).json({ message: 'Method not allowed', data: null, status: false }) } })
-
This article will demonstrate how to build a contact manager with Next.js and Fauna by walking you through the process of building a Google contact application clone.
-
Basic knowledge of Express.js
Related posts
- I developed a simple but beautiful developer portfolio template using React and Next.js
- New Video: How to get started with the TERN stack
- Next.js vs. Angular: Comparing key features and use cases
- I made a developer portfolio template using React and Next
- Any framework recommendations for 2023? Does React still has good demand?