A demonstration website for function requests developed with Next.js + Tailwind CSS + shadcn/ui technology stack, showcasing how to deploy and run Node Functions based on the Koa framework on EdgeOne Pages.
- Modern UI DesignοΌAdopting a black background with white text theme, using #1c66e5 as the accent color
- Responsive LayoutοΌSupporting desktop and mobile devices, providing the best user experience
- Real-time API DemoοΌIntegrating Express backend, supporting real-time function call testing
- Componentized ArchitectureοΌUsing shadcn/ui style component system
- TypeScript SupportοΌComplete type definitions and type safety
- Next.js 15 - React full-stack framework
- React 19 - User interface library
- TypeScript - Type-safe JavaScript
- Tailwind CSS 4 - Utility-first CSS framework
- shadcn/ui - High-quality React components
- Lucide React - Beautiful icon library
- class-variance-authority - Component style variant management
- clsx & tailwind-merge - CSS class name merging tool
- Express.js - Node.js Web application framework
- Node Functions - EdgeOne Pages serverless function
express-template/
βββ src/
β βββ app/ # Next.js App Router
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Main page
β βββ components/ # React components
β β βββ ui/ # UI basic components
β β βββ button.tsx # Button component
β β βββ card.tsx # Card component
β βββ lib/ # Utility functions
β βββ utils.ts # General utilities
βββ public/ # Static resources
βββ package.json # Project configuration
βββ README.md # Project documentation
- Node.js 18+
- npm or yarn
npm install
# or
yarn install
edgeone pages dev
Access http://localhost:8088 to view the application.
edgeone pages build
- Project title and description
- One-click deployment and documentation view button
- Express code example display
- Real-time function call testing
- Loading status display
- Result display
- Mobile-friendly layout
- Adaptive component sizing
- Touch-friendly interaction
The project uses Tailwind CSS 4, supporting custom color variables:
:root {
--primary: #1c66e5; /* Primary color */
--background: #000000; /* Background color */
--foreground: #ffffff; /* Foreground color */
}
Using class-variance-authority
to manage component style variants, supporting multiple preset styles.
- EdgeOne Pages Official DocumentationοΌhttps://docs.edgeone.com
- Next.js DocumentationοΌhttps://nextjs.org/docs
- Tailwind CSS DocumentationοΌhttps://tailwindcss.com/docs
- Express.js DocumentationοΌhttps://expressjs.com
- Push the code to a GitHub repository
- Create a new project in the EdgeOne Pages console
- Select the GitHub repository as the source
- Configure the build command:
npm run build
- Configure the output directory:
.next
- Deploy the project
Create a node-functions/
folder in the project root directory, adding an Express application:
// node-functions/express/[[default]].js
import express from "express";
const app = express();
app.get("/", (req, res) => {
res.json({ message: "Hello from Express on Node Functions!" });
});
export default app;
This project uses the MIT License - see the LICENSE file for details.