Skip to content

Nuxt 3 environment-optimized app using TypeScript, optimized Dockerfiles, Vitest and Cypress for tests, Istanbul for code coverage, Pug templating and Sass for styling. Todo app is just the means to run the app.

janswist/nuxt-app

Repository files navigation

Nuxt 3 Application

Setup

Make sure to install the dependencies:

npm install

Development Server

Start the development server on http://localhost:3000

npm run dev

Production

Build the application for production:

npm run build

Locally preview production build:

npm run preview

Check out the deployment documentation for more information.

Docker

Development

Build development-optimized image

docker build -t nuxt-app -f Dockerfile.dev .

Tip: to quickly check absolute path to your directory use pwd command in your terminal.

Development server

docker run --rm -it \
-v /path/to/your/app/locally:/usr/src/app \
-p 3000:3000 \
-p 24678:24678 \
nuxt-app

Production

Build production-optimized image

docker build -t nuxt-app-prod -f Dockerfile.prod .

Production server

docker run --rm -it --init -p 3000:3000 nuxt-app-prod

Testing

Unit tests

npm run test

E2E testing

Requires localhost server already running.

  • npm run dev before starting e2e tests to the local development server (if not already started)
  • npm run cypress:open
  • after Cypress dialog opens click Start E2E Testing in Chrome
  • select Todo.cy.js to start tests

To close:

  • on the initial Cypress dialog click Close

Code coverage

npm run coverage

About

Nuxt 3 environment-optimized app using TypeScript, optimized Dockerfiles, Vitest and Cypress for tests, Istanbul for code coverage, Pug templating and Sass for styling. Todo app is just the means to run the app.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published