Make sure to install the dependencies:
npm installStart the development server on http://localhost:3000
npm run devBuild the application for production:
npm run buildLocally preview production build:
npm run previewCheck out the deployment documentation for more information.
Build development-optimized image
docker build -t nuxt-app -f Dockerfile.dev .
Tip: to quickly check absolute path to your directory use
pwdcommand 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-appBuild production-optimized image
docker build -t nuxt-app-prod -f Dockerfile.prod .
Production server
docker run --rm -it --init -p 3000:3000 nuxt-app-prodnpm run test
Requires localhost server already running.
npm run devbefore 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.jsto start tests
To close:
- on the initial Cypress dialog click
Close
npm run coverage