This repository provides a full-stack Node.js boilerplate for building web applications using a tech stack that includes Next.js, Express.js, Auth0, TypeScript, and Tailwind CSS.
This template is a companion to a detailed blog post that explains how to integrate Next.js with Express.js and Auth0 for authentication. Read the full guide here.
- Next.js: For server-side rendered React applications.
- Express.js: Backend server handling API requests and other server-side logic.
- Auth0: Secure and scalable authentication and authorization.
- TypeScript: Static typing for JavaScript, enhancing development experience and maintainability.
- Tailwind CSS: Utility-first CSS framework for rapid UI development.
-
Clone the Repository
git clone git@github.com:benjamin-chavez/nextjs-express-auth0-template.git
-
Install Dependencies
pnpm install
-
Setup Auth0
- Create an account on Auth0.
- In Auth0, set up a Next.js Application and an Express API.
- Update the
.env
files with your Auth0 credentials.
-
Run the Development Server
pnpm run dev
Open http://localhost:3000 with your browser to see the result.
-
Build the application for production:
pnpm run build
-
Start the production server:
pnpm start
This project is licensed under the MIT License. See LICENSE for details.