Skip to content

Instantly share code, notes, and snippets.

View QYL's full-sized avatar
🏠
Working from home

Y QYL

🏠
Working from home
View GitHub Profile
# Next.js Subpath Deployment Guide
This guide explains how to deploy a Next.js application to a server that only supports a custom `server.js` entry point and hosts the app on a subpath (e.g., `https://app.com/myapp`).
## Table of Contents
1. [Prerequisites](#prerequisites)
2. [Step 1: Update Next.js Configuration](#step-1-update-nextjs-configuration)
3. [Step 2: Create Custom Server File](#step-2-create-custom-server-file)
4. [Step 3: Update Package.json Scripts](#step-3-update-packagejson-scripts)
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,