0.0.8 • Published 5 years ago

@worldsayshi/servant v0.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Servant

Serve a React component with a CLI

Command line interface that serves a react component with server and client side rendering.

Currently the component needs to be compiled to UMD. See below and examples/hello-world-typescript.

Usage

Install servant:

$ npm install -g @worldsayshi/servant

Run the example:

$ cd examples/hello-world-typescript
$ npm install
$ servant dist/helloWorld.js

The react component will be served at http://localhost:3000 by default.

Multiple components

$ (cd examples/show-components && npm run prepare)
$ servant examples/show-components/dist/

Then go to any of these:

http://localhost:3000/evergreen-autocomplete-example.tsx.js http://localhost:3000/svg.tsx.js

Developing

Build on change

npm run watch

Restart on change

npm run watch-run -- examples/hello-world-typescript/dist/helloWorld.js
0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

6 years ago