@oframe/server v1.0.5
@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/serveryarn add @oframe/serverCommands
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 3000node server ./projects/