• Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Bablosoft

Node JS with google trends API

Scheduled Pinned Locked Moved Support
7 Posts 3 Posters 1754 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hippyzipp9
    wrote on last edited by
    #1

    Hi,

    I want to integrate google trends with my app. I tried it via embedded languages option with node js but for some reason it does not output anything to log.

    Can somebody please help me with this?
    Here's the API - https://www.npmjs.com/package/google-trends-api

    1 Reply Last reply
    0
  • H Offline
    H Offline
    hippyzipp9
    wrote on last edited by
    #2
    const mysql = require('mysql2');
    
    // create the connection to database
    const connection = mysql.createConnection({
        host: 'localhost',
        user: 'root',
        database: 'db',
        password: ''
    });
    
    
    await(new Promise((resolve, reject) => {
        /*Place your code here and call resolve to proceed*/
        connection.connect(function (err) {
            if (err) {
                return console.error('error: ' + err.message);
            }
    
            console.log('Connected to the MySQL server.');
        });
        resolve()
    }));
    
    

    Nothing is being shown on logs that is no output whatsoever even for connection of mysql2 module of Node JS. Am I the only person experiencing this?

    ? 1 Reply Last reply
    0
  • ? Offline
    ? Offline
    A Former User
    replied to hippyzipp9 on last edited by
    #3

    @hippyzipp9 said in Node JS with google trends API:

    Nothing is being shown on logs that is no output whatsoever even for connection of mysql2 module of Node JS. Am I the only person experiencing this?

    You just don't know javascript
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

    H 1 Reply Last reply
    0
  • H Offline
    H Offline
    hippyzipp9
    replied to Guest on last edited by
    #4

    @UserTrue Exactly why I use BAS so I don't have to learn code.

    Where am I going wrong? I followed the exact instructions on the documentation page of node.js.

    tet-viviT ? 2 Replies Last reply
    1
  • tet-viviT Offline
    tet-viviT Offline
    tet-vivi
    replied to hippyzipp9 on last edited by
    #5

    @hippyzipp9 alternative mysql-cli https://community.bablosoft.com/topic/942/база-данных-mysql/6
    But in order to work with the database, you need to know sql.

    1 Reply Last reply
    0
  • ? Offline
    ? Offline
    A Former User
    replied to hippyzipp9 on last edited by
    #6

    @hippyzipp9

    const mysql = require('mysql2');
    
    // create the connection to database
    const connection = mysql.createConnection({
        host: 'localhost',
        user: 'root',
        database: 'db',
        password: ''
    });
    
    
    await(new Promise((resolve, reject) => {
        /*Place your code here and call resolve to proceed*/
        connection.connect(function (err) {
            if (err) {
                reject('error: ' + err.message);
            }
    
            console.log('Connected to the MySQL server.');
            resolve()
        });
        
    }));
    
    
    H 1 Reply Last reply
    1
  • H Offline
    H Offline
    hippyzipp9
    replied to Guest on last edited by
    #7

    @UserTrue said in Node JS with google trends API:

    @hippyzipp9

    const mysql = require('mysql2');
    
    // create the connection to database
    const connection = mysql.createConnection({
        host: 'localhost',
        user: 'root',
        database: 'db',
        password: ''
    });
    
    
    await(new Promise((resolve, reject) => {
        /*Place your code here and call resolve to proceed*/
        connection.connect(function (err) {
            if (err) {
                reject('error: ' + err.message);
            }
    
            console.log('Connected to the MySQL server.');
            resolve()
        });
        
    }));
    
    

    Thanks, your solution worked.

    1 Reply Last reply
    0

  • hellomembershaH

    png js

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    308 Views
    No one has replied
  • H

    how to get 'ad count' and 'ad number' on google search result page

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    466 Views
    No one has replied
  • B

    Solving ReCaptcha v2 with HTTP requests (2Captcha API)

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    861 Views
    No one has replied
  • R

    Remote NodeJS API

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    538 Views
    No one has replied
  • B

    multilogin api

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    903 Views
    No one has replied
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
  • Login

  • Don't have an account? Register

  • Login or register to search.