Nuxt.js Framework Guide
Nuxt.js is the most popular open source Vue-based framework. It allows developers to use all the features you need for production in a front-end framework: file-system routing, rendering modes, data fetching, and more. No config needed. Check out their documentation for guides to all these key features. This guide assumes you are using Nuxt 3.
To get started, you can run the following command to create a new Nuxt.js project and the follow the steps in their automatic setup guide:
npx nuxi init <project-name>
After you have created your application, cd into your project directory:
cd <your project directory>
To deploy your project to Atlas, it will need to be available on GitHub. The Nuxt.js installation process lets us initialize a local repository for the project.
Create a new remote repository at repo.new, and then run the following commands to initalize and configure your local and remote repositories:
# Add remote repository$ git remote add origin https://github.com/<username>/<repo># Stage all changed files$ git add -A# Commit the files to the current branch$ git commit -m "initial commit"# Push changes to remote repository$ git push -u origin main
Atlas detects that it is a Nuxt.js app and runs the
build script in your
package.json file. The default output mode for Nuxt is a Node.js server that gets created as a part of the build process. To run this server on Atlas, change your
start script in
package.json to the following:
This will run your Nuxt app in universal rendering mode (server-side rendering and hydration).
To commit these changes to GitHub, run the following commands:
# Stage all changed files$ git add -A# Commit the files to the current branch$ git commit -m "update build and start"# Push changes to remote repository$ git push -u origin main
Once your project is in GitHub, you can follow the directions in our getting started guide to deploy your project to Atlas.
Please visit the Nuxt.js documentation for more in depth details on framework features.