Browse Source

feat: svrx mock

master
wally 4 years ago
parent
commit
a3fed857ba
  1. 16
      .svrxrc.js
  2. 16
      package.json
  3. 7
      route.js

16
.svrxrc.js

@ -0,0 +1,16 @@
module.exports = {
port: 3000,
https: false,
// registry: 'https://registry.npm.taobao.org',
plugins: [
{
name: 'qrcode',
options: {
ui: true
}
},
// 'weinre',
'mock',
]
}

16
package.json

@ -0,0 +1,16 @@
{
"name": "plugin-templete",
"version": "1.0.0",
"description": "",
"main": ".svrxrc.js",
"scripts": {
"dev": "svrx --mock --route route.js"
},
"repository": {
"type": "git",
"url": "gitea@dd.tall.wiki:wally/plugin-templete.git"
},
"keywords": [],
"author": "",
"license": "ISC"
}

7
route.js

@ -0,0 +1,7 @@
get('/blog').to.json({
code: 200,
msg: 'ok',
data: {
title: 'Hello world'
}
})
Loading…
Cancel
Save