主要是用的是默认的配置覆盖能力。 http://www.midwayjs.org/pandora/zh-cn/base/global_config.html
比如,你想pandora 的启动端口从 7002 变为 3000,那么可以这么做。
// config.js
module.exports = {
actuator: {
http: {
You are Manus, an AI agent created by the Manus team. | |
You excel at the following tasks: | |
1. Information gathering, fact-checking, and documentation | |
2. Data processing, analysis, and visualization | |
3. Writing multi-chapter articles and in-depth research reports | |
4. Creating websites, applications, and tools | |
5. Using programming to solve various problems beyond development | |
6. Various tasks that can be accomplished using computers and the internet |
主要是用的是默认的配置覆盖能力。 http://www.midwayjs.org/pandora/zh-cn/base/global_config.html
比如,你想pandora 的启动端口从 7002 变为 3000,那么可以这么做。
// config.js
module.exports = {
actuator: {
http: {
var util = require('util'), | |
vm = require('vm'), | |
fs = require('fs'); | |
vm.runInNewContext(fs.readFileSync('user.js'), { | |
requestUrl: requestUrl | |
}, 'myfile.vm'); | |
function requestUrl(url, callback) { | |
require('request')(url, function (error, response, body) { |
var h = setInterval(function(){ | |
console.log('start check'); | |
if($('#mi3Btn a')) { | |
console.log('check it'); | |
clearInterval(h); | |
$('#mi3Btn a').click(); | |
var tagName = $('#fkNumTxt .hide').tagName; | |
var n = $$('#fkNumTxt ' + tagName+':not(.hide)'); | |
if(n && n.length) { | |
$('#fkNum').value = n[0].innerText + n[1].innerText + n[2].innerText+ n[3].innerText; |
String.prototype.each=function(i,fun){ | |
var index=0; | |
var that=this; | |
while(index<=that.length){ | |
(fun||function(){})(that.substr(index,i)) | |
index+=i; | |
} | |
} | |
var exec=require('child_process').exec; | |
var iconv=require('./iconv-lite'); |
var http = require('http'); | |
function getPort (cb) { | |
var server = http.createServer(); | |
server.listen(0); | |
server.on('listening', function() { | |
var port = server.address().port; | |
server.close(); | |
cb(port); | |
}); |
{ | |
"autoBind": true, | |
"stopOnError": false, | |
"msg": { | |
"tpl": '<div class="msg {prefixCls}"><p class="{style}">{msg}</p></div>', | |
"style":{ | |
"success":'attention', | |
"error":'error' | |
} | |
}, |
本身vmarket同步html到demo环境是完全可行的,唯一的不足就是会丢失参数和状态
假如vmarket传递vm模板那么量又会过大,那如果合并所有的vm之后是否可行? -> control这样就需要重复多次,虽然会比较麻烦,但是依旧似乎可以实时,然后把合并后的vm和数据文件传输到demo服务器,每次查看是通过vmarket服务器提供的渲染接口来返回html,不知道这样是否可行