Jump to content

Search the Community

Showing results for tags 'nodejs'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 5 results

  1. I am currently working mongodb and nodejs from w3schools website. I have seen an error in a code. https://www.w3schools.com/nodejs/nodejs_mongodb_create_db.asp In this website there is a code for creating website. : var MongoClient = require('mongodb').MongoClient; var url = "mongodb://localhost:27017/mydb"; MongoClient.connect(url, function(err, db) { if (err) throw err; console.log("Database created!"); db.close(); }); When I run this, I see this on the terminal: (node:26812) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. Database created! I needed to change 3rd line. old 3rd line: MongoClient.connect(url, function(err, db) { new 3rd line: MongoClient.connect(url, {useUnifiedTopology: true}, function(err, db) {
  2. Bonjour, J'ai un petit problème... Mon application NodeJS tourne en local depuis le début du développement. Mais impossible de la publier ... (la box est bien paramétrée pour router l'adresse publique port 8080 vers l'adresse du serveur local port 8080). Mais pas de réponse... Je précise que le firewall nftables est désactivé, que je tourne sous Debian 10. Merci d'avance pour vos retour.
  3. Hi! I've found an obsolete property name in tutorial Node.js Upload Files: files.filetoupload.path Attempts to call it throw an error. Today the right property name will be the next: files.fileUpload.path I think it should be fixed so as not to disorient beginners. Thanks!
  4. Hi! I'm Vincent from Matters. I am transitioning from PHP to JavaScript. I wanted to give back to the community so I wrote an article about it: https://blog.matters.tech/migrating-from-php-to-javascript-with-node-js-155534498b58 I hope it will be useful to some! Feedback warmly welcome https://twitter.com/cold_lestat
  5. Hello. I have a problem with a function that contains a callback. The problem is, when I execute it the first time, it works without no problem, but the second time, the callback is executed twice: first with the first value and later with the second value. I post the code and an example of running Code of the function: function titulo(terminoTitulo) { console.log("titulo():"); console.log("titulo(): Fuera del callback: " + terminoTitulo); consultar_titulo(terminoTitulo, function (titulo) { console.log("titulo(): termino: " + terminoTitulo); console.log("titulo(): Dentro del Callback"); console.log("titulo(): "+titulo.length); }); Code of the proxy that receives the parameters and calls to a nodejs server: function consultar_titulo(titulo_consulta, callback) { var socket = io.connect('http://localhost:8080'); socket.emit('consultar_titulo', { "titulo_consulta": titulo_consulta }); console.log("proxy(): Emitida la consulta"); socket.on('respuesta_consultar_titulo', function (data) { console.log("proxy(): Estoy en el proxy dentro del callback"); callback(data.respuesta_emit); });} //consultar_titulo() Example of running. titulo():titulo(): Fuera del callback: bbb proxy(): Emitida la consulta proxy(): Estoy en el proxy dentro del callback titulo(): termino: aaa titulo(): Dentro del Callback titulo(): 0 proxy(): Estoy en el proxy dentro del callbacktitulo(): termino: bbb titulo(): Dentro del Callbacktitulo(): 0 In this example the first time, the user introduced "aaa", and the second time "bbb". As can see, the function is called once but when the callback is executed two times. Regards
×
×
  • Create New...