New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cna

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cna

Create next.js apps boilerplate

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

CNA (create next.js app)

Create next.js web app based on next.js.

Quick overview

npm install -g cna

cna my-next-app
cd my-next-app/
npm start

Getting started

Require

To use hot-code reloading. You need nodemon package.

npm i -g nodemon

Installation

install it once globally npm

npm i -g cna

You’ll need to have Node >= 6 on your machine. You can use nvm to easily switch Node versions between different projects.

You don't need to use Node as your primary backend. The Node installation is only required for CNA and running the Next.js server in development/production.

Creating an App

To create a new app, run commands below:

cna my-app

cd my-app

It will create an project with name my-app with structure below:

my-app
├── assests/
├── node_modules/
├── components
│   └── Article/
│   └── Header/
└── containers
    └── Home/
├── hoc/
    └── withLayout.js
├── middlewares/
    └── clientMiddleware.js
├── pages/
    └── _document.js
    └── index.js
├── reducer/
    └── index.js
├── static/
    └── img/
    └── manifest.json
├── utils/
    └── constants.js
    └── request.js
├── .babelrc
├── .gitignore
├── config.js
├── index.js
├── next.config.js
├── package.json
├── README.md
├── server.js
├── store.js
├── yarn.lock

Commands

npm start or yarn start

Runs app in development mode.

Open http://localhost:3000 to view it in the browser.

The app will automatically reload when code changes.

npm run build or yarn run build

Builds app in production mode.

It correctly bundles React in production mode and optimizes the build for the best performance.

npm run production or yarn run production

Builds and runs app in production mode.

Now your app is ready to deploy.

Demo

Screenshot

screen shot 2017-08-16 at 5 05 09 pm

iOS full screen

aug-16-2017 17-04-40

What's inside?

Front end

Data source

Alternatives

If you don’t agree with the choices made in this project, you might want to explore alternatives with different tradeoffs. Some of the more popular and actively maintained ones are:

FAQs

Package last updated on 16 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc