New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details โ†’ โ†’
Socket
Book a DemoSign in
Socket

partymix

Package Overview
Dependencies
Maintainers
1
Versions
704
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

partymix

PartyKit + Remix = PartyMix

latest
npmnpm
Version
0.0.16
Version published
Weekly downloads
716
4673.33%
Maintainers
1
Weekly downloads
ย 
Created
Source

PartyMix: ๐ŸŽˆ PartyKit โคซ Remix ๐Ÿ’ฟ

This is a remix.run adapter to deploy applications to PartyKit servers.

Get started

You can create a new PartyMix app with the following command:

npx create-remix@latest ./my-remix-app --template partykit/remix-starter

That's it! Alternately, you can add PartyMix to an existing Remix app with the following steps:

Usage

First, install the dependencies:

npm install partykit partymix

Define your PartyKit server like so:

// src/server.js

import { createRequestHandler } from "partymix";
import * as build from "@remix-run/dev/server-build";

const handleRequest = createRequestHandler({ build });

export default class MyRemix {
  static onFetch(request, lobby, ctx) {
    return handleRequest(request, lobby, ctx);
  }
}

And your partykit.json like so:

// partykit.json
{
  "name": "partymix",
  "main": "build/server.js", // point to the built version of your server
  "serve": "public"
}

And your remix.config.js like so:

// remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
export default {
  ignoredRouteFiles: ["**/.*"],
  server: "./src/server.js",
  serverConditions: ["partykit", "workerd", "worker", "browser"],
  serverMainFields: ["browser", "module", "main"],
  serverModuleFormat: "esm",
  serverPlatform: "neutral"
  // ...
};

You can then run your app locally:

npx remix dev --manual -c "npx partykit dev"

And then deploy the whole thing with:

npx remix build && npx partykit deploy

Thanks

(This adapter based on the original template for Cloudflare Workers)

FAQs

Package last updated on 19 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts