@packmule/server
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

Development Server

Simple development server.

packmule comes with a development-server which wraps the browser-sync server and uses the webpack-dev-middleware and webpack-hot-middleware to watch and reload the web application on demand.

Setup

npm install --save-dev @packmule/server

API

Server(
  webpackConfiguration: webpack.Configuration;
  browsersyncOptions: browsersync.Options | browsersync.Options[];
)
.launch()

Usage

Example

import Server from '@packmule/server';
import configuration from './webpack.config.ts';
import options from './.browsersyncrc.json';

const server = new Server(
    configuration({
        development: true,
        server: true,
    }),
    options,
);

server.launch();

options can be a browser-sync configuration object or an array of configuration objects, to launch multiple servers.

License

MIT


Readme

Keywords

none

Package Sidebar

Install

npm i @packmule/server

Weekly Downloads

315

Version

2.1.0

License

MIT

Unpacked Size

7.83 kB

Total Files

11

Last publish

Collaborators

  • t.esterer
  • thasmo