@oframe/server

1.0.5 • Public • Published

@oframe/server

The @oframe/server is a node http server for development purposes. It has the following simple features:

  • Static file serving
  • File streaming
  • Adds trailing slash
  • Clean urls
  • Directory listing
  • Single page app redirect
  • Automatic port designation

Development was inspired by Servor, which I would recommend if you need more advanced functionality, such as https, file watching and gzip compression.


Install

Is recommended to use through @oframe/cli global commands, however to install separately:

npm i @oframe/server
yarn add @oframe/server

Commands

All commands are recommended to be made through the provided bin: o.


serve

The serve command creates a new http development server in the current repository.

Syntax

node serve [path] [port]

Arguments

path

An String path description of the repository you'd like to serve from. Using pwd or . can be used in the command-line to refer to the current command path.

port

An Integer describing the desired port. Default is 8080. If port unavailable, will incrementally search for an available one, rather than returning an error.

Usage

node server pwd 3000
node server ./projects/

Readme

Keywords

none

Package Sidebar

Install

npm i @oframe/server

Weekly Downloads

0

Version

1.0.5

License

none

Unpacked Size

37 kB

Total Files

4

Last publish

Collaborators

  • cinemont