0.1.0 • Published 10 years ago
temp-server v0.1.0
temp-server

Serve specific route with specific content.
Install
$ npm install -g temp-serverUsage
# interactive mode
$ temp-server
# arguments mode
$ temp-server --port 3000 --body "hello {{params.name}}" --url "/:name"Use Case
Verify LetsEncrypt domain:
$ temp-server
> this.body = i9fh5Ik4Vkjzerr...long...hash
> options.url = /.well-known/acme-challenge/i9fh5Ip...long...hash
> options.port = 4000API
const tempServer = require('temp-server')
tempServer(options)tempServer(options)
options
url
Type: string
Default: /
A router fragment, like /a/b/c or /foo/:name
port
Type: number
Default: 4000
Server port
body
Type: string
Default: hello world
The content to be print.
License
MIT © EGOIST
0.1.0
10 years ago