This is an example of how to set up a NuxtJS application to deploy on Kinsta’s Application Hosting services.

NuxtJS is shipped with plenty of features to boost developer productivity and end-user experience. The key features include:

  • Zero Configuration: Start coding your app right away, Nuxt takes care of the rest.
  • File-system Routing: Automatic routing and code-splitting for every page.
  • Rendering Modes: Switch between static-site generation or on-demand server rendering.
  • Data Fetching: Fetch your content from any source in your Vue components, SSR ready.
  • Strong Conventions: Efficient teamwork with a strong directory structure and conventions.
  • SEO Friendly: Meta tag management and faster time-to-content for great indexing.
  • Components Auto-import: Use your components, Nuxt will import them with smart code-splitting.
  • Modules Ecosystem: Extend your app with 160+ Nuxt modules and create your own.

More information is available on Nuxtjs.org.

During the deployment process, Kinsta automatically installs dependencies defined in your package.json file.

  1. Fork the following GitHub repository: Kinsta – Hello World – NuxtJS.
  2. In MyKinsta, add an application with the Hello World – NuxtJS repository. The Start command can be left blank for the web process as Kinsta automatically detects the required command during the first deployment.

The app is available as soon as the build finishes, and a Hello World page loads at your application’s URL.

NuxtJS Hello World page after successful installation.
NuxtJS Hello World page after successful installation.

Web Server Setup

Port

Kinsta automatically sets the PORT environment variable. You do not need to define it or hard-code it into the application.

Start Command

When you deploy the application, Kinsta automatically creates a web process with npm start as the Start command.

Deployment Lifecycle

Whenever a deployment is initiated (through creating an application or re-deploying due to an incoming commit) the npm build command is run, followed by the npm start command.