Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Apr 27 2018 01:23
    @MylesBorins banned @fjeddy
  • Feb 24 2016 08:26
    @rvagg banned @jonathanenbe
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(
    (err, res) => {
      if (err) return err;
      return res.rows;
    totalRegcords: totalRegcords,
    pagination: pagination
console.log(pagination); shows first then this console.log(res.rows);
Peter Delvaux
you should rewrite your query to return a Promise, or something like this:
let pagination = await new Promise((resolve, reject) => {
    (err, res) => {
      if (err) reject(err);

Dhaval Parmar
@ay2306 have you tried this ?
What will be query for pagination with total count in postgres ?
Peter Delvaux
about 30
Sandeep Gupta
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

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!


Strictly for developers or those learning any programming language

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

Hi, is there a recommended tsconfig for node 12?
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
@Wilx1 You're trying to use push() on undefined which...you can't do. You can only use .push() on an array
Pedro Moura
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
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?
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
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:
function AuthToken(agent) {     
      axios.post(URL HERE, PAYLOAD HERE)
            .then(function(response) {
                    "name": 'token',
                    "lifespan": 5,
                    "parameters": { "access_token": response.data.access_token }
                return console.log(response);
            .catch(function(error) {                
                return console.log(error);

Ben Halverson
Tiago Satur
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?
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?
Xarri Jorge
Why ES Harmony is better than CommonJS or AMD?
Whats up folks? Anyone have an idea on the question above?
Danilo Silva
Does someone knows if is possible to do webscrap of cookies?
Jordan Harband
"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
Thanks brother @ljharb
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
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
it won't be forgotten at all, ESM and CJS both encourage modules/libraries
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

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
@ljharb Thanks man !
Puncoz Nepal
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.
hello, everyone. which code editor is best
Nare Sai Chaitanya
@MrZ2019 If you are looking for free trier VS Code is the best. When comes to enterprise WebStorm is the best in my opnion
推荐一个款程序员导航 https://nav.imaring.com
Peter Delvaux
@MrZ2019 vim is pretty cool once you find out how to close it
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
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
GPS has no relationship to your IP, IPs can be geolocated from the server.
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
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?
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?