open-index/open-npm huggingface dataset:
npm package: @feidao-factory/dev
Description: For debug web apps
Latest version: 5.0.201812141820
Deprecated: deprecated

# Web Server, including HTTP and HTTPS.

----------
----------

## Installation

You can install latest version with `npm`:

```sh
npm install @feidao-factory/dev
```

## Usage

When you have this package installed, you can start the server:

## feidao.json

```json
{
	"APPID": "nodejs-client",
	"KAFKA": {
		"URI": "kafka://192.168.40.195:9092",
		"TOPIC": "feidao-soa-log-nodejs-client",
		"SSL_KEY": "./sslcert/server.key",
		"SSL_CERT": "./sslcert/server.crt"
	},
	"RABBITMQ": "amqp://guest:guest@127.0.0.1:5672",
	"EXPIRATION": 15000,
	"SIGN_ROUTER_QUEUE_NAME": "q_sign_router",
	"DELIVERY_MODE": 2,
	"TIMEOUT": 5000,
	"PORT": 8889,
	"HTTPS": {
		"PORT": 443,
		"SSL_KEY": "./sslcert/server.key",
		"SSL_CERT": "./sslcert/server.crt"
	},
	"ACAO": "*",
	"ACMA": 150000,
	"COOKIE_MAX_AGE": 150000,
	"CALLBACKS": {
		"ALL": {
			"/test": "test"
		},
		"GET": {
			"/test": "test"
		},
		"POST": {
			"/test": "test"
		}
	},
	"URLS": {
		"SEND_MESSAGE": "/sendmessage",
		"HTML": "/*.html"
	},
	"REDIRECTS":{
		"/test": "test"
	}
}
```

### 说明：

* APPID
	SOA中的APPID
* KAFKA
	KAFKA连接参数
* RABBITMQ参数
	* `RABBITMQ`： Rabbit连接参数
	* `EXPIRATION`: Rabbit消息失效超时设置，单位毫秒
	* `SIGN_ROUTER_QUEUE_NAME`: 签收队列名称
* Http
	* `PORT`: http服务端口号,如果为空，则不启动http服务
* Http 服务相关配置
	* `HTTPS.PORT`: 端口号
	* `HTTPS.KEY`: 密钥
	* `HTTPS.CERT`: 证书
* routers 回调地址

	```json
	[{
		"URL": "login",
		"METHOD": "post",
		"SERVICE": "dataservice.nodejs",
		"DATA": {
			"modelid": "custom::js_web/login"
		}
	}]
	```
* 跳转
* 其它
	* `TIMEOUT`： 通过RabbitMQ请求soa服务超时设置
	* `COOKIE_MAX_AGE`: 设置cookie有效期限，单位毫秒
	* `ACMA`: 跨域请求时，options预请求有效时间，单位毫秒
	* `ACAO`: 跨域访问策略,其内容将被写入响应头Access-Control-Allow-Origin项中. `*`表示允许所有跨域访问;该项为空则不允许所有跨域访问;也可以为域列表。详情参阅[CORS_Enabled](https://www.w3.org/wiki/CORS_Enabled)

## favicon.ico

显示在浏览器地址栏以及收藏栏中的图标

## log4js.json

日志配置，具体请参考官方说明：[log4js](https://github.com/nomiddlename/log4js-node)

## projects

html,js,css文件，可以放在此目录下.