Serve the builds of a project.
- Can serve any project with a
build
directory. - Flexible, as it searches upwards to find projects.
- Provides creature comforts like directory listings.
As a dependency:
npm install sitecues/sitecues-nest --save
As a project to work on:
git clone git@github.com:sitecues/sitecues-nest.git &&
cd sitecues-nest &&
npm link
$ nest --help
Usage
$ nest
Option
--port Listen on a specific HTTPS port for requests.
--insecure-port Listen on a specific HTTP port for requests.
--target Open a specific build in your browser.
--open Open the server root in your browser.
Example
$ nest
Build available at https://localhost/
$ nest --port=7000
Build available at https://localhost:7000/
Get it into your program.
const Nest = require('sitecues-nest');
Start the server.
const server = new Nest();
server.start().then(() => {
console.log('Listening.');
});
Returns a new server instance.
Type: object
Server configuration.
Type: number
Default: 443
if run as root, otherwise 3000
The HTTPS port that the server will listen on when .start()
is called.
Type: number
Default: 80
if run as root, otherwise 3000
The HTTP port that the server will listen on when .start()
is called.
Type: object
Default: key
/cert
combo for localhost
The encryption settings used for HTTPS connections.
See our contributing guidelines for more details.
- Fork it.
- Make a feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
Copyright © Sitecues. All rights reserved.