Skip to content

divinitas-art/flickserve

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

flickserve πŸ›

Ultralight http server with live reload.
CLI + API


This is fork of nativew/serve. I missed fallback option usefull for apps with react router


Simple CLI and API

With live reload

Light and modern

No dependencies


One command

npm init flickserve

Or one function

import flickserve from 'flickserve';

flickserve.start();

To start πŸ›


CLI

By default, it serves public if the folder exists, otherwise root /.
Or you can specify a different folder.

npm init flickserve [folder]

API

import flickserve from 'flickserve';

flickserve.start({
    port: 7000,
    root: '.',
    fallback: undefined, // set to "index.html", great for react router etc.
    live: true
});

Live reload

serve.update();

Use any file watcher


Chokidar

import flickserve from 'flickserve';
import chokidar from 'chokidar';

flickserve.start();

chokidar.watch('.').on('change', () => {
    flickserve.update();
});

esbuild

Use the official wrapper for esbuild's watch Β  β†’ Β  esbuild-serve


Log

Import the util functions to log updates with colours.

import flickserve, { error, log } from 'flickserve';

flickserve.update();

hasError
    ? error('Γ— Failed') // Red
    : log('βœ“ Updated'); // Green



About

πŸ› Ultralight http server with live reload. [CLI + API]

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.2%
  • HTML 10.8%