Skip to content

Create a tiny web server which does not support the MVC pattern, for simple Node.js app.

License

Notifications You must be signed in to change notification settings

cedced19/fast-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast Http

Build Status NPM version

Installation

npm install fast-http  --save

Usage

Create a tiny web server which does not support the MVC pattern,for simple Node.js app.

Because I copy the same code in all my projects.

How to use

Basic usage:

var server = require('fast-http'),
    port = 80,
    root = __dirname,
    wordy = true;

server(port, root, wordy);

// __dirname is the name of the directory that the currently executing script resides in.

The third argument specified if it'll log all request.

If you want to use it with socket.io:

var server = require('fast-http')(80, __dirname, false);

var io = require('socket.io').listen(server);

CLI

NPM version

Installation:

npm install fast-http-cli  -g

Options:

-h, --help                  output usage information

-V, --version               output the version number

-p, --port [number]         specified the port

-w, --wordy                 specified if it'll log all request

Use:

fast-http

About

Create a tiny web server which does not support the MVC pattern, for simple Node.js app.

Resources

License

Stars

Watchers

Forks

Packages

No packages published