989 B
989 B
-
nextjs alternative : remix Initialization https://yewtu.be/watch?v=__mSgDEOyv8
-
Use this to setup nextjs
npx create-next-app@latest myappThennpm run devto run it -
To run a production build
npm run buildthennpm run start -
Running on different port In
package.json"scripts": { "dev": "next dev -p 3001", "build": "next build", "start": "next start -p 3001", "lint": "next lint" }, -
running it as serverless mode, generate SSG in next.config.js, do following for static export
/** * @type {import('next').NextConfig} */ const nextConfig = { output: 'export', // Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html` // trailingSlash: true, // Optional: Prevent automatic `/me` -> `/me/`, instead preserve `href` // skipTrailingSlashRedirect: true, // Optional: Change the output directory `out` -> `dist` // distDir: 'dist', } module.exports = nextConfig