Sep 17, 2:00 PM

Run SvelteKit and Convex dev servers together with concurrently.

If you’re running Convex and SvelteKit, you might want to run both

pnpm dev

And

pnpx convex dev

For convenience, I made the following setup:

Install concurrently pnpm add concurrently -D

In package.json

Change

{@html `		"dev": "vite dev --host",`}

To

{@html `		"dev": "concurrently --names 'svelte,convex' --prefix-colors \"#f96743,#F3B01C\" \"vite dev --host\" \"pnpx convex dev\"",,
		"dev:vite": "vite dev --host",
		"dev:convex": "pnpx convex dev",`}

Tadaam, now I just need to run pnpm dev to get both SvelteKit and Convex to run in a single terminal window.

PS: And yes, these hex codes are Svelte’s Orange and Convex’s yellow.