Skip to content

Add PartyKit to existing project

Follow this quick guide to add PartyKit to your existing app, and deploy it in just a few minutes.

Note that to run PartyKit, you need to have Node v. 17 or higher installed.

Add PartyKit to an existing app

Add PartyKit to your existing project using the following command in the project’s root directory:

Terminal window
npx partykit@latest init

This command installed two packages (partykit and partysocket) and added the party directory with a server template.

Run a dev server

Run the following command in your terminal in your project’s directory to start the dev server:

Terminal window
npx partykit dev

Develop your server

Add desired behavior to your server, and connect it to the UI.

Deploy your app

Lastly, deploy your PartyKit server:

Terminal window
npx partykit deploy

To read more about deploying PartyKit server, check our deployment guide.

Enjoy 🎈

Welcome to the party, pal!

Questions? Ideas? We’d love to hear from you 🎈 Reach out to us on Discord or Twitter!