Skip to content

sitecues/sitecues-nest

Repository files navigation

sitecues-nest Build status for sitecues-nest on Circle CI.

Serve the builds of a project.

Why?

  • Can serve any project with a build directory.
  • Flexible, as it searches upwards to find projects.
  • Provides creature comforts like directory listings.

Install

As a dependency:

npm install sitecues/sitecues-nest --save

As a project to work on:

git clone [email protected]:sitecues/sitecues-nest.git &&
cd sitecues-nest &&
npm link

Usage

Command line

$ 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/

Programmatic

Get it into your program.

const Nest = require('sitecues-nest');

Start the server.

const server = new Nest();
server.start().then(() => {
  console.log('Listening.');
});

API

Nest(option)

Returns a new server instance.

option

Type: object

Server configuration.

port

Type: number
Default: 443 if run as root, otherwise 3000

The HTTPS port that the server will listen on when .start() is called.

insecurePort

Type: number
Default: 80 if run as root, otherwise 3000

The HTTP port that the server will listen on when .start() is called.

tls

Type: object
Default: key/cert combo for localhost

The encryption settings used for HTTPS connections.

Contributing

See our contributing guidelines for more details.

  1. Fork it.
  2. Make a feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request.

License

Copyright © Sitecues. All rights reserved.

About

Serve the builds of a project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published