rollup-plugin-gun-server

1.0.1 • Public • Published

rollup-plugin-live-server

Why this thing

This will spin up a local Gun server for testing.

Use

npm i rollup-plugin-gun-server -D
// rollup.config.js
import {gunServer} from 'rollup-plugin-gun-server';
// or
const gunServer = require('rollup-plugin-gun-server');

export default {
    input: client,
    plugins: [ gunServer({ port: 8001 }) ],
    output: {
      file: 'dist/my-fabulous-thingy.js',
      format: 'es'
    }
}

How it works

It spins up a gun server for local testing. It grabs gun by using require('gun/gun') so it doesn't provide any persistence. Not having persistence during development with Gun is important because otherwise deleting data is hard.

The server will be available at 'ws://localhost:{port}/gun'.

Readme

Keywords

Package Sidebar

Install

npm i rollup-plugin-gun-server

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

16.6 kB

Total Files

10

Last publish

Collaborators

  • robhicks