Questions tagged as 'node.js'

1
answer

Heavy-duty CPU application blocks concurrent requests

In a web application it is common for each request to create a new thread that handles all processing and if for some reason the thread gets blocked by performing a heavy task, the resource is allocated to the request. I understand that this...
asked by 22.09.2017 / 18:31
1
answer

Download corrupted with NodeJS

I created a server with ExpressJS where I upload and download various files: FileController.prototype.downloadFile = function(req, res) { var filePath = "./upload/" + req.body.pasta + '/' + req.body.file; res.download(filePath, f...
asked by 18.09.2017 / 17:55
1
answer

How to properly use Discod EMBED bot

How can you format the message that the bot sends in this way? I can even do it, but I can not put divisions in the same line, and if possible, how can I put background in the division?     
asked by 19.09.2017 / 09:13
1
answer

Error in MongoDB / Mongoose?

I'm trying to start my server, but when I try to start it, it says MongoDB error, and I've been looking for a solution to this problem for some time now, and so far I have not found anything. What complicates even more is the fact that I was...
asked by 19.09.2017 / 18:46
1
answer

How to load multiple routes in node.js in a .jade

Is there any way to load multiple routes within a same .jade file, for example: I can have a /menu route, another /header , another /clientes , when calling the /clientes route I give res.render('clientes') and...
asked by 26.09.2017 / 12:55
1
answer

Render an html on the node with js

I can route on the node where it calls an html page, however the html page has a .js file and when it is called from the error of not finding the JS file. Can anyone help me? Structure: main folder: project Sub folders: config, js, v...
asked by 24.09.2017 / 01:54
0
answers

How to save Json to host location via Ajax?

<!DOCTYPE html> <html> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><title>teste</title><bodystyle="background-color: white"> <form> Primeiro Nome: <...
asked by 13.09.2017 / 05:39
0
answers

Connection Cluster for MS SQL Server

I need to create a Connection Cluster for MS SQL Server. Here is an example I made in MySQL: var mysql = require('mysql'); var db_cluster_config = require('./dbMysqlUtils').cluster_config; var mySqlDB = function (config, logConfig) { t...
asked by 12.09.2017 / 21:22
0
answers

Is it possible to return a value inside a callback, without another callback? [duplicate]

Well, I have a function that returns a value for a callback, but I wanted it to return without this callback, is it possible? Function in question: function getProfile(id, fn) { var sql = "SELECT * FROM profiles WHERE ID in ('" + id...
asked by 31.08.2017 / 22:32
1
answer

Is it possible to use node.js in cpanel?

I want to make both an application and a website communicate with my database through node.js . I would like to know if any host as the simplest ones that have cpanel (godaddy) support node.js or mongoDB in>.     
asked by 05.09.2017 / 02:45