Bolierplate code for building production ready React app using Next.js.
Also contains CSS styling using Semantic-UI-React
Written by Yogesh.
npm run dev
Runs next
which starts Next.js in development mode at http://localhost:3000.
npm run build
Runs next
build which builds the application for production usage.
npm start
Runs next start which starts a Next.js production server
To start developing your application run npm run dev
. This starts the development server on http://localhost:3000.
Visit http://localhost:3000 to view your application.
So far, we get:
Automatic compilation and bundling (with webpack and babel) Hot code reloading Static generation and server-side rendering of ./pages/ Static file serving. ./public/ is mapped to /
pm2 start npm --name "your-app-name" -- run dev
npm run build pm2 start npm --name "your-app-name" -- start
You can follow me on Medium.
This code is released under the MIT License.