Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 27 2018 01:23
    @MylesBorins banned @fjeddy
  • Feb 24 2016 08:26
    @rvagg banned @jonathanenbe
romie
@theromie
routes.route("/get").get(async (rq, rs) => {
  const { pageNo, itemsPerPage } = rq.query;
  let totalRegcords = [];
  let pagination = [];
  //Get Total Claim records
  totalRegcords = await db.query(QUERY.ADMINCLAIM.count, (err, res) => {
    if (err) return err;
    return res.rows;
  });

  //Get Claim Paginate records
  pagination = await db.queryPaginated(
    QUERY.ADMINCLAIM.get,
    [],
    pageNo,
    itemsPerPage,
    (err, res) => {
      console.log(res.rows);
      if (err) return err;
      return res.rows;
    }
  );
  console.log(pagination);
  rs.status(STATUS.OK).json({
    totalRegcords: totalRegcords,
    pagination: pagination
  });
});
console.log(pagination); shows first then this console.log(res.rows);
Peter Delvaux
@pjetr
you should rewrite your query to return a Promise, or something like this:
let pagination = await new Promise((resolve, reject) => {
  db.queryPaginated(
    QUERY.ADMINCLAIM.get,
    [],
    pageNo,
    itemsPerPage,
    (err, res) => {
      if (err) reject(err);

      resolve(res.rows);
    }
  );
});
@theromie
Dhaval Parmar
@TechGeekD
@ay2306 have you tried this ?
npm install github:[GITHUB_USERNAME]/[GITHUB_REPO]#[BRANCH_NAME]
romie
@theromie
What will be query for pagination with total count in postgres ?
Peter Delvaux
@pjetr
about 30
Sandeep Gupta
@iamsandeepgupta
Hi, I have registered as Paytm merchant and have integrated the Paytm wallet in my node app and its working fine. I have tested initiate transaction API which is working fine as per it. Redirection and everything are working fine. Now I want to implement wallet transfer API in my node application so that I can make a transfer from a merchant to other users by their mobile number but in docs of Paytm, it was mentioned to have Subwalletguid in payload while calling API. I tried but I am not able to get the Subwalletguid anywhere on my dashboard. Link of the docs:- https://developer.paytm.com/docs/wallet-transfer-api/
I am stuck from last week on this.
Olonilua Olalekan
@lecxis

How savvy are you on the latest dev tools and technologies? All developers who complete the survey and register enter a raffle to win $16,000 worth of prizes. Get your community involved too - promote the survey and you may win in addition $1,000 in cash!

https://developereconomics.net/?member_id=pdSrFATx&lang=en

Strictly for developers or those learning any programming language

Make your voice heard and earn cool cash and swags as a developer.

Uzlopak
@Uzlopak
Hi, is there a recommended tsconfig for node 12?
Wilx1
@Wilx1
Hello, Good day all. Please I'm following up on Colt's yelpcamp tutorial, but I ran into this error: TypeError: Cannot read property 'push' of undefined. Please, any attempt to help me rectify it would be greatly appreciated. Thanks in anticipation.
Jason Luboff
@JLuboff
@Wilx1 You're trying to use push() on undefined which...you can't do. You can only use .push() on an array
Pedro Moura
@pouta
Hey! I need help with debugging a local dependency
This means I can't debug easily because all code in /dist is minified
when I add it as local dependency in package.json the main project uses the /dist folder
sakthivel
@Sakthi-Gnanam
Hey! I need help regarding thread local like implementation in node js with the help of async hooks. Am a newbie here, I looked around and found async hooks impacts performance in a negative, also they are experimental API. Any idea, how did the developers maintain the context before async hooks?
prudhvivijaykumar
@prudhvivijaykumar
Hello All, While login I have generated JWT Token without expiration time. So while re-login with the same credentials then I want to destroy the previous token. Any solution.?
Ashwin Kain
@Ashwin-Kapes
I'm trying to create a context inside axios response but it's not working. I'm using dialogflow-fulfillment library. Here's my code:
dialogflow/dialogflow-fulfillment-nodejs#280
function AuthToken(agent) {     
      axios.post(URL HERE, PAYLOAD HERE)
            .then(function(response) {
               agent.context.set({
                    "name": 'token',
                    "lifespan": 5,
                    "parameters": { "access_token": response.data.access_token }
                });
                return console.log(response);
            })
            .catch(function(error) {                
                return console.log(error);
            });

 agent.add(`Hello`);
    }
Ben Halverson
@benhalverson
Tiago Satur
@tiagosatur
Yo guys, does someone knows if webscraping in nodejs has a big server cost? i mean, i will use firebase function to do it and i can't have a big cost.
Also, is possible to get the site cookies using webscrap?
Yossitrx
@Yossitrx
Hey,
I have nodejs application that serve the hbs client files. I wish to create a new client app based on webpack and connect them both can someone help?
watscho
@watscho
Xarri Jorge
@xarrijorge
Why ES Harmony is better than CommonJS or AMD?
Whats up folks? Anyone have an idea on the question above?
Danilo Silva
@danilosilvadev
Does someone knows if is possible to do webscrap of cookies?
Jordan Harband
@ljharb
"ES Harmony" isn't really a thing anymore
if you mean ES Modules, well, for one, AMD is abjectly terrible
with ESM vs CJS, it's not really that one's better or worse, but CJS is sync and thus can't work natively in the browser
Xarri Jorge
@xarrijorge
Thanks brother @ljharb
Pat
@patsmithw_twitter
Hey, I have a node.js problem. Sometimes I get this "ER_NO_DB_ERROR: No database selected" and sometimes I don't. Anyone have an idea? Thanks
Z3TA
@Z3TA
As I see it , Node.js style require has been the greatest invention in CS history, it encourages making libraries rather then spaghetti. It's so sad that it will soon be forgotten as more and more people start using ES import. I'll probably not see something as simple and beautiful as Node.js was before ES6 in the rest of my life time.
Jordan Harband
@ljharb
it won't be forgotten at all, ESM and CJS both encourage modules/libraries
drethegreat1
@drethegreat1
hey, i know this is not the right page but maybe someone can help
need help figuring out how to use webhooks for MODE Analytics alerts
Govind S
@dopecodez

it won't be forgotten at all, ESM and CJS both encourage modules/libraries

right on, esm is basically built for letting us use require going forward

Nare Sai Chaitanya
@saichaitanyan
@ljharb Thanks man !
Puncoz Nepal
@puncoz
Postman is an API client to query API for testing and debugging. Besides querying an API, the postman has lots of other features like collection, test scripts, environment, and global variables, runner, etc. are useful to make the development process easier and efficient.
MrZ
@MrZ2019
hello, everyone. which code editor is best
Nare Sai Chaitanya
@saichaitanyan
@MrZ2019 If you are looking for free trier VS Code is the best. When comes to enterprise WebStorm is the best in my opnion
HJ.Y
@hdyanghj
推荐一个款程序员导航 https://nav.imaring.com
Peter Delvaux
@pjetr
@MrZ2019 vim is pretty cool once you find out how to close it
SerhiiBulakh
@SerhiiBulakh
hello guys could you help me with my issue. I get data with date how it is updated last time, and field dayOfWeek and periodicity, periodicity has three state: weekly monthly two-weekly, I need to check periodicity with dayofweek and date if it is true i need to handle it. I don’t now how it check. but it need to do without pougin
dinesh
@1532j0004kg
Eventhough, I am not enabling the GPS location from my phone or laptop. How the website owners find my IP address and location informations by using third party APIs? Can anyone tell me please!
Jordan Harband
@ljharb
GPS has no relationship to your IP, IPs can be geolocated from the server.
Henry667
@Henry667
HI there i am building news app, where user can swipe down for latest news. I am stuck on backend issue, How can i check for news that already read by specific users ?
any idea ?
Daniel Marcano
@DanielMarcano
Hello guys. How are you? I have a doubt with something: are there (fully) free cloud storages like Amazon S3 one? I have an app mounted on Heroku in which I allow the user to upload images to the server. Nonetheless, I just realized that Heroku's dynos filesystem is ephemeral, and everything uploaded gets deleted. I checked Amazon S3 as a free solution but it's only 2K POST calls and 20K GET calls yearly, I think... So that wouldn't work for me. Does anyone know a cloud storage that's fully free only with storage limitation?
donnae7
@donnae7
Hi guys im new to nodejs and I am trying to convert post request xml to json, however when i display the req in the console the xml is in the rawBody therefore the express-xml-bodyparser is not parsing the xml?