1.0.9 • Published 10 years ago
websmock v1.0.9
webSmock
websmock is built by giving express http server, you can set up multiple vhost simple configuration. websmock combines the handlebars, mockjs, widget. Let mock test data easier. If the back-end using the template engine handlebars, front and rear ends to achieve the perfect separation
npm: https://www.npmjs.com/package/websmock
##demo
####Create base directory
>mkdir nodeapp
>websmock -c demo
>websmock -c demo1
>vim app.js####Create app.js (config)
var path = require('path');
var config = [
{
host: 'test.demo.com',
path: path.join(__dirname, 'demo')
},
{
host: 'test.demo1.com',
path: path.join(__dirname, 'demo1')
}
];
module.exports = config;####start
|--- demo
|--- demo1
|--- app.jswebsmock --start or websmock -s