easyserve

browser-sync in an easy to use TypeScript class

Usage no npm install needed!

<script type="module">
  import easyserve from 'https://cdn.skypack.dev/easyserve';
</script>

README

easyserve

browser-sync in an easy to use TypeScript class

Availabililty

npm git git docs

Status for master

build status coverage report npm downloads per month Dependency Status bitHound Dependencies bitHound Code Known Vulnerabilities TypeScript node JavaScript Style Guide

Usage

Use TypeScript for best in class instellisense.

import { EasyServe } from 'easyserve'

let myEasyServe = new EasyServe('/some/path/to/webroot', 8080)
myEasyServe.start().then(() => {
    // this is executed when server is running guaranteed
    myEasyServe.stop() // .stop() will work even if not waiting for server to be fully started
})

myEasyServe.reload() // reloads all connected browsers of this instance

For further information read the linked docs at the top of this README.

MIT licensed | © Lossless GmbH | By using this npm module you agree to our privacy policy

repo-footer