1.1.0 • Published 6 years ago

luminol v1.1.0

Weekly downloads
4
License
CC0-1.0
Repository
github
Last release
6 years ago

luminol

A better dev server.

build status coverage license version downloads

Features:

  • Run server-side node applications in development mode.
  • Parallelized builds for multi-webpack configurations.
  • Universal, detachable IPC.
  • Simple, dynamic proxying.
  • Host multiple applications at once.

IMPORTANT: We're not super battle-tested. Use at your own risk. The current version is a fairly major rewrite and while the external API you use for spawning the server hasn't changed much for the typical use case, a lot of stuff has changed.

Usage

#!/bin/sh
luminol -c client.webpack.config.js -c server.webpack.config.js

API

createServer()

import {createServer} from 'luminol';
import {compose, get, send} from 'midori';

const server = createServer({
  port: 3030,
  clipboard: true,
  hot: true,
  http2: false,
  https: false,
  logLevel: 'debug',
  open: false,
  config: [
    './webpack.config.js',
  ],
  add: (app) => {
    return compose(
      get('/status', send('OK')),
      app,
    );
  },
});

// Bind to server.
server.on('listening', () => {
  console.log(`Listening on ${server.address().port}`);
});