GithubHelp home page GithubHelp logo

runt18 / polyserve Goto Github PK

View Code? Open in Web Editor NEW

This project forked from polymer/polyserve

0.0 3.0 0.0 240 KB

A simple web server for using components locally

Home Page: https://www.npmjs.com/package/polyserve

JavaScript 1.18% TypeScript 95.24% HTML 3.58%

polyserve's Introduction

polyserve

Build Status

A simple development server for web projects.

polyserve serves project files from a URL root that allows relative URLs that reach out of the project, like those starting with ../, to work. This is necessary for referencing other packages by path when stored as a flat directory such as how Bower works.

The local package is served at the URL /components/{bower-name}/, with files served from the current directory. Other packages are served at /components/{packageName} with files served from their directory under ./bower_components/.

Installation

$ npm install polyserve -g

Usage

Run polyserve

$ cd my-element/
$ polyserve

Browse files

Navigate to localhost:8080/components/my-element/demo.html

Options

  • -c The component directory to use. Defaults to reading from the Bower config (usually bower_components/)
  • -n Package name. Defaults to reading from bower.json
  • -p The TCP port to use for the web server
  • -o Opens your default browser to an initial page, e.g. "demo" or "index.html"
  • -b <browsername> use this browser instead of default (ex: 'Google Chrome Canary')
  • -H <hostname> use this hostname instead of localhost
  • -P <protocol> The server protocol to use {h2, https/1.1, http/1.1}. h2 requires Node 5+.
  • -key <path> Path to TLS certificate private key file for https. Defaults to "key.pem".
  • -cert <path> Path to TLS certificate file for https. Defaults to "cert.pem".
  • -manifest <path> Path to h2-push manifest

Compiling from Source

$ npm install
$ npm run build

You can compile and run polyserve from source by cloning the repo from Github and then running npm run build. Make sure you have already run npm install before building.

Run Tests

$ npm test

polyserve's People

Contributors

addyosmani avatar antleblanc avatar antono avatar aomarks avatar atotic avatar danners avatar fredkschott avatar garlicnation avatar jeffposnick avatar justinfagnani avatar lostinbrittany avatar mbleigh avatar nevir avatar ragingwind avatar rictic avatar timvdlippe avatar tony19 avatar usergenic avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.