/blog

blog built with Next.js and hosted on now

Primary LanguageJavaScriptMIT LicenseMIT

Next.js 🧳

A starting point for my Nextjs Project with default config and components 🧳

Contents

Quick Overview

degit https://github.com/casprine/backpack\#nextjs my-app
cd my-app
yarn start

Then open http://localhost:3000/ to see your app.
When you’re ready to deploy to production, create a minified bundle with yarn build or npm run build.

Get Started

This project scaffold is created manaully with inspiration from creat-next-app. Project is clonend with degit. Make sure you have it installed globally.

degit https://github.com/casprine/backpack\#nextjs my-app

What's in my-app

degit will create a directory called my-app inside the current folder. Inside that directory, it will generate the initial project structure.

.
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ next.config.js
β”œβ”€β”€ package.json
β”œβ”€β”€ pages
β”‚   β”œβ”€β”€ _document.js
β”‚   └── index.js
β”œβ”€β”€ server.js
β”œβ”€β”€ static
β”‚   β”œβ”€β”€ fonts
β”‚   β”‚   └── ciruclar.ttf
β”‚   └── sass
β”‚       └── index.scss
β”œβ”€β”€ todo.md
β”œβ”€β”€ utils
β”‚   β”œβ”€β”€ helpers.js
β”‚   β”œβ”€β”€ index.js
β”‚   └── localStorage.js
└── yarn.lock

Once the cloning is complete, enter the directory and install dependencies.

cd my-app
yarn

or

cd my-app
npm install

Once the installation is finished, you can run some commands in your project:

npm run start or yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any errors in the console.

npm run build or yarn build

Builds the app for production to the .next folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

npm run start or yarn start

Starts the application in production mode. The application should be compiled with npm run build first.

Now you're ready to code & deploy your app!