Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged nodejs

0 votes
1.5k views
1 answer
    mongoose 中 created_at字段的默认值 Date.now 是不是不能设置时区?如何设置?(默认: 都是格林威治时间) created_at: { type: Date, default: Date.now }...
asked Feb 19, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    nodejs新手,一直报这些错,但是页面上没有任何错误,求怎么解决...
asked Feb 19, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    如题,nodejs在使用gearman,会报如下错误 Error: Gearman.receive_WORK_FAIL, 查询了一下.没有看到解决方案, 有人遇到类似的问题吗?...
asked Feb 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    我的项目用express框架,需要在centos下后台运行,我百度说有两种方法,nohup和forever,我两种都试过,无效,什么原因? nohup npm start & 命令结果如下: 浏览器不能访问; npm install -g forever && forever start app.js 结果如下: 浏览器还是不能访问,求大神解答...
asked Feb 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    使用express框架做的web,在使用weibo社交登录的时候,想到一个问题 向新浪微博社交接口,发出获取access_token以后,社交接口会回调nodejs提供的url 在回调的时候,session应该是服务器与新浪微博社交 ... 跳转到微博的页面,这过程中,微博的服务器访问(回调)nodejs服务器,request里面会带着用户的cookie?...
asked Feb 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    var jiaoben=req.body.jiaoben || req.query.jiaoben; console.log("jiaoben:"+jiaoben); shell.exec(jiaoben,function (code, stdout, stderr) { // ... shelljs模块的exec去执行脚本,可是输出的信息不完整啊,咋办呢?...
asked Feb 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    就是为什么 console.log(data[i] +' : ' + data[i].flag) 输出的 data[i] 没有 flag 值 代码 输出...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    打印出来的req.body { 'movie[_id]': 'undefined', 'movie[title]': 'adffff', 'movie[doctor]': 'adsfadf', 'movie[cpountry]' ... 现在打印req.body._id 提示 Cannot read property '_id' of undefined ...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    我有几个模块,需要这几个模块同步执行,现在时异步执行 整个流程的功能为解压文件并重命名解压后的文件 以下为示例代码,需要注意的是代码的结构不能改变 谢谢大家的帮助! var mods = [];//模块集合 ... options); }); 我尝试过 q, Step, async.series 等,均无法解决我的问题,请 nodejs 大神们给个好的方案 ...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    throw new Error('asdasdad') 这样会返回 { error: asdasdad, error_code: 500, } 如何指定error_code呢? 例如 throw new Error('asdasdad', 400)...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    写了一个简单的基于chreeio的数据爬取代码,node http的模块获取html 然后用chreeio爬取 想使用最新的async await 来异步操作.代码如下: let request = require('request') ... (); 不知道哪里写错了,目的就是想在test()里面能直接拿到getList返回的newCollection;...
asked Feb 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    同样是 [] + {} 浏览器和 Nodejs 的返回值不同...
asked Jan 29, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    如题: nodejs 单进程 操作 sqlite 多个异步任务是排队的还是并发的? 因为我只用一个连接,如果是并发那么就有问题,想请问下大家...
asked Jan 29, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    当客户端对压缩包进行分片传到服务端时,使用stream流合并文件分片,没有任何报错,但最后打开压缩包发现缺失了部分资源,压缩包的大小却和上传前一样...有大佬踩过这 ... (chunkArray, callback) } else { cb && cb() } }); }; readStream(chunkPaths, callback);...
asked Jan 29, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    是发生了什么,有什么运动么?...
asked Jan 29, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.0k views
1 answer
    nodejs 如何执行 shell 命令,并把结果实时回显输出? const exec = require('child_process').exec; exec('shell 命令', (error, stdout, stderr) => { console.log({ ... 在命令执行完毕才一次性返回, 而不是实时回显 请问如何让输出实时回显?...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    检测是否安装JAVA, 和JAVA安装的版本号 请问除了利用 exec 执行 java -version 获取结果外 有没有更优雅的方式来检测?...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    问题描述 原先代码都放在一整个 .js 文件里,我想把代码拆分成模块。现在模块内有了多个 .js 文件,文件之间应该如何共享全局状态变量比较好?比如多个文件内定义的函数都需要依赖一个全局的 currentIndex 来执行。 目前的思路有单独建一个子模块导出状态对象,或者执行函数的时候传递 context,但是不知道安全性和易用性如何。 求指点一下思路。...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    function getAccessTokenls (req, res) { const resObj = Common.clone(Constant.DEFAULT_SUCCESS); // 定义好的成功返回模板 const appId = CONFIG.WECHAT.APP_ID ... 改成body,接口直接报502错误,没有往下走了,是哪里出了问题呢...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    如题,我想用nodejs启动htop这个命令,我目前的方式是: import { spawn } from 'child_process'; const child = spawn('/usr/bin/htop', { shell: true }); ... 盘事件,我想要的效果和直接在terminal里面输入htop回车的效果一样,nodejs可以实现么?...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    this.ysMemberSeq.transaction(async (t: sequelize.Transaction) => { //sql查询语句 return t; }).then((result) => { console.log("result: ... ).catch((err) => { console.log("err:", err) })...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    像PHP有https://github.com/overtrue/w...,nodejs没看到有特别好的封装库...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    像PHP有https://github.com/overtrue/w...,nodejs没看到有特别好的封装库...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    [背景描述] 使用nodejs election开发了一个运行在linux平台上的应用 [问题] 但有新版本发布时如何自动更新应用...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    // some.js Object.clone = src => { ... } module.exports = { ... } // REPL > require("some") { ... } > Object.clone undefined 咋办...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    // some.js Object.clone = src => { ... } module.exports = { ... } // REPL > require("some") { ... } > Object.clone undefined 咋办...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    如题,使用以下语句查询后,要怎么判断查询成功或失败?例如 select * from user where id=1,想要判断数据库是否存在id=1这条数据的话该如何写? connection.query(sql,sql_params,(err,result)= ... ?){ //数据存在,如何取值做对比? }else{ //数据不存在,执行其它... }...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    如题,使用以下语句查询后,要怎么判断查询成功或失败?例如 select * from user where id=1,想要判断数据库是否存在id=1这条数据的话该如何写? connection.query(sql,sql_params,(err,result)= ... ?){ //数据存在,如何取值做对比? }else{ //数据不存在,执行其它... }...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
To see more, click for the full list of questions or popular tags.
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...