Getting Started Qwikly
Creating an app using the CLI
The first step is to create an application. Qwik comes with a CLI that allows you to create a basic working skeleton of an application. We will use the CLI to create a blank starter so that you can quickly familiarize yourself with it. Qwik supports NPM, yarn and pnpm.
Run the Qwik CLI in your shell
Choose the package manager you prefer and run the following command:
npm create qwik@latest pnpm create qwik@latest yarn create qwik
The CLI will guide you through an interactive menu to set the project-name, select one of the starters and asks if you want to install the dependencies.
After your new app is created, you will see an output like the following in your terminal:
🐰 Let's create a Qwik app 🐇 v0.16.1 ✔ Where would you like to create your new project? … qwik-app ✔ Select a starter › Basic App (QwikCity) ✔ Would you like to install pnpm dependencies? … yes ✔ Installing pnpm dependencies... 🦄 Success! Project created in qwik-app directory 🐰 Next steps: cd qwik-app pnpm start 🔌 Integrations? Add Netlify, Cloudflare, Tailwind... pnpm qwik add 📚 Relevant docs: https://qwik.builder.io/docs/getting-started/ 💬 Questions? Start the conversation at: https://qwik.builder.io/chat https://twitter.com/QwikDev 📺 Presentations, Podcasts and Videos: https://qwik.builder.io/media/
At this point, you will have a
qwik-app directory, that contains the starter app.
Running in development
Once the application is download.
- Change into the directory created.
- Invoke the dev server
npm start pnpm start yarn start
- You should see a server running with your starter application
VITE v4.0.1 ready in 515 ms ➜ Local: http://127.0.0.1:5173/ ➜ Network: use --host to expose ➜ press h to show help
- Visit http://localhost:5173/ to explore the app.
Running in production
To run the application locally in production, run the following command:
npm run preview
It will build your application and the Vite preview server to serve the application.
It's very easy to deploy your Qwik application to the cloud, as static files, or your own server.
Please check out the deployment section for more details.
Qwik is designed to be integrated with other tools. Such as
partytown... run the following command to see the list of available integrations:
npm run qwik add
and don't forget to check the integrations section for more details.