项目作者: gamikun

项目描述 :
Simple JSON response server and no third party dependencies
高级语言: JavaScript
项目地址: git://github.com/gamikun/just-say-it.git
创建时间: 2018-04-26T08:43:35Z
项目社区:https://github.com/gamikun/just-say-it

开源协议:MIT License

下载


When you need a server that only needs an endpoint and returns a single object.

Example

  1. const justsayit = require('justsayit')
  2. justsayit(1522, req => {
  3. return {'hello', 'world'}
  4. })

That’s it. 1522 is the port, and the {‘hello’: ‘world’} the JSON response.

You can also return a string in the callback instead of an object.