Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cevio/webservice
soyie webservice
https://github.com/cevio/webservice
Last synced: 4 days ago
JSON representation
soyie webservice
- Host: GitHub
- URL: https://github.com/cevio/webservice
- Owner: cevio
- Created: 2015-10-09T11:53:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-22T06:31:43.000Z (almost 9 years ago)
- Last Synced: 2024-10-02T23:46:15.049Z (about 1 month ago)
- Language: JavaScript
- Size: 9.99 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webservice
webservice 是一套单页面级的路由框架,包含了`soyie` `soyie-http-router`等框架或组件,能够实现复杂路由功能,类似于nodejs的`express`框架。它的优点在于我们可以处理复杂逻辑的页面路由,通过自定义路由回调,轻松实现页面逻辑。
# install
> nap install --save webservicer
# usage
``` javascript
var soyie = require('soyie');
var webservice = require('webservicer');
var app = webview(soyie);
app.active(function(req, res){
res.render('home');
});
soyie.ready(function(){
app.listen('envirs-cms');
});
```# app
app 是一个webservice初始化的实例对象,可以认为是一个HTTP服务引擎。
## app api