3.1.2 • Published 5 years ago

simpl3s v3.1.2

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

Simpl3s

Small, fast, quick and easy node.js file flinger with a silly name.

Features

  • Small static file HTTP server
  • Fast!
  • CSS/HTML/JS files are automatically minified and gzipped
  • JSON/SVG/TXT/XML file are automatically gzipped
  • Silly name

Quick usage

require('simpl3s').standAloneServer();

Sample configuration

const simpl3s = require('simpl3s'),
    config = {
        gzip    : true,
        minify  : true,
        port    : 8081,
        path    : './public'
    };

simpl3s.standAloneServer(config);

Complete configuration

const simpl3s = require('simpl3s'),
    config = {
        etag        : true,
        gzip        : true,
        immutable   : true,
        maxAge      : 181635468200,
        minify      : true,
        path        : './www',
        port        : 8080
    };

simpl3s.standAloneServer(config);

Serve a single file

const simpl3s = require('simpl3s'),
    server = require('http'); 

server
    .createServer(simpl3s.serveFile)
    .listen(8080);

Just optimise static assets

require('simpl3s').speedify({}, './public');

Notes

Explicit port configuration will be ignored if a cloud environment is detected. Defaults to 8080 when no port is specified.

Installation

npm

  • npm install simpl3s
3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.24

6 years ago

3.0.23

6 years ago

3.0.22

6 years ago

3.0.21

6 years ago

3.0.20

6 years ago

3.0.13

6 years ago

3.0.12

6 years ago

3.0.11

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.1.98

6 years ago

2.1.97

6 years ago

2.1.96

7 years ago

2.1.95

7 years ago

2.1.94

7 years ago

2.1.93

7 years ago

2.1.92

7 years ago

2.1.91

8 years ago

2.1.9

8 years ago

2.1.8

8 years ago

2.1.7

8 years ago

2.1.5

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.6

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.0

9 years ago

1.0.0

10 years ago

0.4.3

10 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.9

10 years ago

0.3.8

10 years ago

0.3.7

10 years ago

0.3.6

10 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago