jspm-dev-server

0.4.1 • Public • Published

JSPM Dev Server

HTTP/2 enabled server with support for systemjs-hot-reloader.

Usage

npm install jspm-dev-server --save-dev
openssl req -x509 -newkey rsa:2048 -keyout localhost.key -out localhost.crt -days 30 -nodes -subj '/CN=localhost'
echo 'localhost.*' >> .gitignore
jspm-dev-server

Then just open https://localhost:3000 and you'll see your app running.

Options


  Usage: jspm-dev-server [options]

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -p, --port <n>       port to listen on. defaults to 3000
    -d, --dir <folder>   directory to serve static files from
    -c, --cert <pem>     path to a PEM certificate. defaults to localhost.crt in current folder
    -k, --key <pem>      path to a PEM key. defaults to localhost.key in current folder
    -i, --ignore <path>  paths to ignore from file watching
    -l, --proxy <url>    url to forward the request if file is not found

Examples

If you have a Rails app and want to serve some assets over HTTP/2, you can use the proxy:

jspm-dev-server --port 3001 --proxy http://localhost:3000

If you need to serve different folder, than you are currently in, use the directory setting:

jspm-dev-server --dir static/

TODO

  • [x] configure which folder to serve
  • [ ] ability to control the middleware
  • [x] configurable paths to certs
  • [x] configurable port
  • [x] proxy to fallback server

Projects

This project is using:

Readme

Keywords

Package Sidebar

Install

npm i jspm-dev-server

Weekly Downloads

1

Version

0.4.1

License

MIT

Last publish

Collaborators

  • mikz