npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@svelte-chat/plugin

v0.0.5

Published

The ***sveltekit*** plugin for **svelte-chat** solution

Downloads

336

Readme

Svelte-Chat-Plugin

The sveltekit plugin for svelte-chat solution

Swift description

Plugin for svelte-chat which in conjuction with @svelte-chat/gui makes remakable chat experiences which at least can handle cases from your online shop etc...

  • This plugin is required to handle communication demanded by frontend solution part which is the @svelte-chat/gui
  • Use only with @svelte-chat/gui to make full svelte-chat solution

Prerequisites

  1. SvelteKit app,
  2. MongoDB configured on port 27017

Installation (as always - for npm)

$ npm i @svelte-chat/plugin

You're one step in front of finish line (whole soultion implementation isn't accounted):

1st: Use svelteChatPlugin which embedds all source functionalities (with administration included)

// vite.config.{js,ts}
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
// Import plugin from module
import { svelteChatPlugin } from "@svelte-chat/plugin";

export default defineConfig({
	plugins: [sveltekit(), svelteChatPlugin()]
});

Fine grainded configuration

Fine grained configuartion covers for moment ports configuration for: basic app communication, admin app and all these optionally and separately. You have to pass config as JSON content for your Device Environment Variable SVELTE_CHAT Configuration JSON Overlay:

{
    /* Admin app - Where serves app under whose you can manage clien cases */
    "admin_server": {
        "port": 10502
    },
    /* App communcation - so where your client-side will be call, to get and send informations */
    "server": {
        "port": 10501
    }
}

As Device ENV "SVELTE_CHAT": Ok, So when we defined what you can configure, to make this work and end fine-grained configuration you must pass such short config to device environment varaible SVELTE_CHAT

How to run app correctly?

Always will be correct for bash CLI (beyond powershell and cmd):

  1. Developement mode
$ ORIGIN="admin_server.port" npm run dev
  1. In production as node app (after transiple sveltekit to node.js handler by use @sveltejs/adapter-node):
$ ORIGIN="admin_server.port" node .
  • Be aware:
    • ORIGIN="admin_server.port" - where is determined "admin_server.port" gives location where your admin_server exists. E.g:
      • Default value should always be 10502 -> in space when you didn't configured Fine grainded configuration admin_server.port number,
      • When you change Fine grainded configuration admin_server.port number you should put that value here

      This isn't my idea but determined via how transpiled to node.js sveltekit app works. Please don't be angry on me 😍!

Other worth informations

  1. Default Admin App port is 10502,
  2. Default App communcation port is 10501 (for this port will be call @svelte-chat/gui client),
  3. It works fully as a vite sveltekit plugin,
  4. To store all datas we use MongoDB local database on default port 27017

Contribution:

You feel will to help in solution evolution. Don't be shy and pull issue with demand like: I would like take the participation in evolution because ...[cause]

License

All what you should know about Copyrights is that all code base is under Apache 2.0