1.0.0 • Published 4 years ago

rollup-plugin-magni-server v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

rollup-plugin-magni-server

Why this thing

This will spin up a local Magni server for testing.

Use

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

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

How it works

It spins up a magni server for local testing. It doesn't provide any persistence. Not having persistence during development with Magni is important because otherwise deleting data is hard.

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