0.1.0-rc.1 • Published 4 years ago

@kard/spa-server v0.1.0-rc.1

Weekly downloads
23
License
ISC
Repository
github
Last release
4 years ago

A simple NodeJS based server allows serving SPA applications with optional API proxy support and all-routes fallback. It developed to test SPA locally, with Puppeteer or Selenium-based frameworks.

Installation

npm add -D @kard/spa-server

Usage

spa-server --proxy=api::http://jsonplaceholder.typicode.com --port=3030 --public=public --fallback=index.html

The example above :

  • Will serve static files from ./public relative path, on port 3030.
  • Each file is absent will be replaced with ./public/index.html one.
  • All of the requests sent to /api/* routes will be redirected to http://jsonplaceholder.typicode.com base.

Command-line keys available

--proxy - allows setting API requests redirect (no default)

--port - allows setting the server port to use (default 3000)

--public - allows setting public path (default ./)

--fallback - allows setting fallback file name (default is index.html)

--route - allows setting base route of the app (default is none)

0.1.0-rc.1

4 years ago

0.1.0-rc.0

4 years ago

0.1.0-beta.20

4 years ago

0.1.0-beta.19

4 years ago

0.1.0-beta.18

4 years ago

0.1.0-beta.17

4 years ago

0.1.0-beta.16

4 years ago

0.1.0-beta.15

4 years ago

0.1.0-beta.14

4 years ago

0.1.0-beta.12

4 years ago

0.1.0-beta.13

4 years ago

0.1.0-beta.10

4 years ago

0.1.0-beta.11

4 years ago

0.1.0-beta.9

4 years ago

0.1.0-beta.8

4 years ago

0.1.0-beta.7

4 years ago

0.1.0-beta.5

4 years ago

0.1.0-beta.4

4 years ago

0.1.0-beta.3

4 years ago

0.1.0-beta.2

4 years ago

0.1.0-beta.0

4 years ago