npm run dev
npm run dev
is used to start your development server when using tools like Vite, Next.js, or other modern JavaScript setups.
⚙️ What happens when you run npm run dev:
1. It looks in your package.json under the "scripts" section.
2. It finds a script like this:
"scripts": {
"dev": "vite"
}
3. So it runs vite, which starts the Vite dev server.
4. You get a local development site — usually at http://localhost:5173.
✅ You’ll see output like:
VITE v5.x.x ready in 300 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
Open that URL in your browser and you’ll see your app running!
If npm run dev doesn’t work, make sure you’ve done:
npm install