Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jun 02 2020 06:16
    @ljharb banned @frank-dspeed
  • Apr 27 2018 01:23
    @MylesBorins banned @fjeddy
  • Feb 24 2016 08:26
    @rvagg banned @jonathanenbe
locally running MySQL Community Server 8.0.26 on macOS
Firewall is off
just tried.. MySql.getSession('http://localhost:33060?ssl-mode=DISABLED') because didn't configure local mysql to use ssl/tls but same ECONNREFUSED
Htc Saj
How to get notifications when someone post something new on Reddit, and how to scrape that new posts. I scrappe data and I can scrape data from current posts on pages like Reddit
John Melody Me

Hey guys I use cheerio to scrape this table but it return nothing. Did I somehow did wrong ?

<table class="table trackTable">
                                <th colspan="4">Consignment No: MY37011088606</th>
                            <th>Consignment No</th>
                            <th>Date &amp; Time</th>
                                    <td>03/07/2020 14:58:43</td>



and my code was

$ = cheerio.load(response['data']);


            $('.table#trackTable').each((index, element) => {
                if (index === 0) return (true);


Any idea ? is the naming of the selctor wrong?

in the browser i did

$(".table > tbody:nth-child(2)").each(function(i,item) { console.log(item.innerText) });

and it return something , but cheerio doesn't

Jordan Harband
table is a tag, not a class, i assue
you want table not .table
altho i see your table has a table class (which is bizarre) so maybe that should work
trackTable is also a class, not an ID.
so .table.trackTable not .table#trackTable
John Melody Me
I see
Actually I solved it already
Thanks tho
MERN Micro Framework

Hello Everyone, MERN Stack Boilerplate provides starter kits for building web, desktop and mobile apps in pure JavaScript.


If you have any query or suggestions. Please let me know.

How to develope a site with backend within 1 hour ???
3 replies
Jordan Harband
you can't
there is a lot of videos in Youtube about how to create MERN within 1h :)
Salathiel Genèse
Which is part of the problem in the industry
Jordan Harband
especially since the M in there is a terrible choice
Salathiel Genèse
Jordan Harband
postgres is a better json document store than mongo, even. mongo's garbage.
It's not so difficult to create a (bad) site, but I think if once I'll create a useful website that people would like :)
Ali Bulut
I made a mern project. I deployed backend heroku. I am logging in with passport js. It works locally but not live. It looks like it cannot find cookies for api queries after login. what could be the problem
Vineet Srivastav
Cors issue because of domains ^
Maybe Try changing secure cookie settings
salah alhashmi
support me by adding star to my volder npm package:

Good morning guys!
Can you please help me with the following challenge ? I've created a form where I am basing the validation on the html attribute. Can anyone help me move the validation to JS file ?


@SalathielGenese Can you please help me with the email validation ?
Salathiel Genèse
No, sorry
Jason Williams
hey folks. Was looking for some guidance on nodeJS. i just started to dig into nodejs, and want to build a small app that would basically capture request headers that come in, and then basically respond back with some response headers. I am looking for some pointers on where to look for that. I appreciate the help.
1 reply
Jordan Harband
surely you mean next, not nest?
Louis Law

May I know the "name" of these question marks?
Please leave me the name/keywords of this is good enough because it is hard to google for this symbol for me. i can do the rest study/read docs/test myself

thanks in advance...

Salathiel Genèse
Optional chaining, @louiscklaw
2 replies
(on the right)
Just a normal string
(on the left)
Jordan Harband
@louiscklaw please don't cross-post; i answered you the same in the airbnb/javascript gitter (this was the best place to ask tho)

I am working with node-mongodb-drive and i can not use $merge stage in the aggregate. mongodb throw this error: MongoError: Unrecognized pipeline stage name: '$merge'.

what can i do?

  • the same aggregate works in the mongo-compass.
Hi guys !
ANybody here to support me on one task
If user inputs an email for example@gmail.com , I would like to force the user not to add any extra letters after the .com
is there a way to do this please?
Salathiel Genèse

@Zerka1982 , consider:

  1. Input pattern attribute (HTML)
  2. DOM form field custom validity + regular expression (JavaScript)
  3. Or a combination of what precedes


I hope you have strong reasons to enforce such rules. Some emerging TLD and thus, email addresses may well have more that three letters at the end (as the spec suggests)... Which is a concern I have from time to time with online service rejecting .berlin, .name, even sometimes .cloud

Anyabuike Kingsley

What is the best way to represent related data in an API response object?

E.g., Say I have an order object. What method would better represent it (relating to logic and performance)?

Prefixing the keys:

    "quantity": 2,
    "date": 237823872,
    "productID": 1
    "productName": "iPhone",
    "productSlug": "www.site.com/iphone",
    "sellerID": 2,
    "sellerName": "Apple",
    "sellerEmail": "apple.com"
    "price": 500.00,
    "paymentStatus": "Successful"

or nested:

    "quantity": 2,
    "date": 237823872,
    "product": {
        "id": 1
        "name": "iPhone",
        "slug": "www.site.com/iphone",
    "seller": {
        "id": 2,
        "name": "Apple",
        "email": "apple.com"
        "price": 500.00,
        "status": "Successful"
Marco Vinicio
@kingsleykbc As far as logic, nested is much better because it's more detailed. So if you're working in a team, or you need someone to help you with your code, the nested approach makes more sense. As far as performance, that's something I've not entirely sure about.
Andres Mazzo
@kingsleykbc i agree with @Mark-B-88 . Performance could be a little more on nested objects due to serialization of json, which increase cpu load. But it only applies for high traffic and big objects to see a significant variation