http-next

Integrate Next.js rendering and API controllers into a Koa HTTP service.

1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/cevio/hile --skill http-next
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: http-next
Source: https://github.com/cevio/hile/tree/main/packages/http-next
Command: npx skills add https://github.com/cevio/hile --skill http-next

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill bridges the gap between the robust Koa HTTP framework and the powerful Next.js rendering engine, allowing them to run on the same HTTP server and share resources efficiently.

Core Features & Use Cases

  • Unified Service: Run Next.js pages and custom API controllers within a single Koa-based HTTP service.
  • File System Routing: Automatically load API controllers from *.controller.ts files under a /- prefix, avoiding conflicts with Next.js routes.
  • Static File Serving: Serve static assets from public/ and Next.js build outputs.
  • Use Case: Develop a full-stack application where Next.js handles the frontend rendering and user interface, while custom API endpoints managed by @hile/http provide backend logic, all served from one unified Node.js process.

Quick Start

Use the http-next skill to create a new Koa service that integrates Next.js rendering and API controllers.

Frequently Asked Questions about http-next

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Next.js and Koa on the same HTTP server?

Integrating Next.js as a rendering engine within a Koa HTTP service allows you to run both on the same server, sharing HTTP servers and resources efficiently from a single unified Node.js process.

How do I add custom API routes in a Next.js Koa application without conflicts?

Add custom API routes in a Next.js Koa application by loading API controllers from `*.controller.ts` files under a `/-` prefix, which avoids conflicts with standard Next.js page routes.

Can I serve static files from a custom directory using Koa and Next.js?

Yes, you can serve static files from a custom directory using Koa and Next.js by configuring static file serving from specified directories like `public/` and Next.js build outputs.

What is the best way to structure a full-stack Koa Next.js application?

The best way to structure a full-stack Koa Next.js application is to let Next.js handle frontend rendering while custom API endpoints managed by Koa provide backend logic within one unified HTTP service.

Does Koa support file system routing for API controllers?

Koa supports file system routing by automatically loading API controllers from `*.controller.ts` files, applying a `/-` prefix to separate backend logic from frontend rendering routes.