Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Brayden Moon
    @bmoon-autoit
    @arunkumar413 let me know if that fixes anything :)
    Arun Kumar
    @arunkumar413
    @bmoon-autoit I tried to access it like this req.body.firstName

    @arunkumar413 Have you tried using body-parser instead?

    It's a bit confusing which one to use body parser or express.json?

    Arun Kumar
    @arunkumar413
    Also does the app.use(express.json()); allows us to access the body as js object?
    MPAN
    @DemoPan
    ✈️
    Brayden Moon
    @bmoon-autoit
    @arunkumar413 I have only ever used body-parser. It just works all the time for me.
    It doesn't really matter if you use the code snippet i use, or the code snippet you use to access the data. Its just a nicer way of exploding the object imo.
    @arunkumar413 At the end of the day, if you can get it to work with express.json go for it, though everything i have ever done has been with body-parser... and everything I have ever read has always said to use body-parser instead of express.json
    Anshul Bartwal
    @techwil
    Hey guys how many of you are using the latest alpha version?
    Adam
    @snowmac
    Anyone have the current lead maintainer's email address? I tried to submit an issue and my issue was blocked.
    Douglas Christopher Wilson, can't find his email anywhere
    The current lead maintainer is Douglas Christopher Wilson
    ASWIN C G
    @AswinCG2002
    Hello everyone, new to this community. Started using express a while back and thought of collaborating with the community. I just went through the Github repo and found that there are no beginner-friendly issues as of now. Any ideas on how should I get started?
    Douglas Wilson
    @dougwilson
    Hi @snowmac it is in the package: https://github.com/expressjs/express/blob/master/package.json#L9 . Sorry you ended up blocked; the default procedure to a security issue reported in the issue tracker is to reply in the issue and delete the contents. If the issue title contains sensitive information, the issue has to be deleted since github does not provide a method to remove the original title from the display. The moderation typically implements a short block to encourage reaching out with the correct procedure, as in the past the original user would just keep opening a new issue over and over with the same content or reposting it. I would encourage you to look at the security policy for any repo before reporting security issues in the future (under the "security" tab for any github repo).
    Ayden
    @WeeHong
    Hi everyone,
    Should I write a test case to check my application is listening to the correct port?
    Kal Sze
    @ksze
    What's the point of doing both?
      app.use((req, res, next) => {
        compression()(req, res, next);
      });
    
      app.use(compression());
    Maxim
    @jamesmaxim:matrix.org
    [m]
    I have and nested object that i want the user to update through inputs but req.body only returns a 1 level nested array. How can i have req.body return the objects in the original form but the value supdated
    Great_Guy96
    @GreatGuy96

    Is there any way to use a dynamic route with an app (or router) .use?
    ex:

    router.use(`/:userid`, getHandler)

    When I do this, getHandler doesn't get req.params.userid.
    I could just get the url and manually interpret it, but it's a lot easier to use dynamic routes, and I just generally like not trying to do the work around way, seeing as there's usually more bugs when I try to do that. Thanks!

    yellow-net
    @yellow-net
    Currently have a express.js API server setup with backend postgres. Setup using passport basic Auth. Now need to setup to use access token. Any recommendations on what tech to use?
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    @yellow-net check out jwt + crypto
    yellow-net
    @yellow-net
    @yosiasz been reading up a bit more. Understand the Oauth2 is the most secure?
    yellow-net
    @yellow-net
    How is it possible to install a let's encrypt cert on express.js with port 3000. When running installer certbot looking at port 80 instead of 3000, even if I add :3000 to the URL?
    yellow-net
    @yellow-net
    I have installed the cors package via nom and added the app. Added cors require and app.use(cors());. However when I test still says cors is not enabled?
    Kal Sze
    @ksze
    Does expressjs care about trailing / in routes?
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    @yellow-net please share your code of how you enabled it
    see this also
    http://expressjs.com/en/resources/middleware/cors.html#configuring-cors
    @ksze what prompts you to ask that question so we dont lead you to a hacky solution :smile:
    Kal Sze
    @ksze
    @yosiasz never mind. :D I had a bug report about my app and it turned out to be unrelated to trailing slash.
    However, now I have a question about app.listen().
    Am I to understand that app.listen() is async because it ultimately returns nodejs' built-in server.listen(), which is asynchronous?
    Abhay2132
    @Abhay2132
    Yup
    Lino Espinoza
    @cloudcatwannabe
    Hello, I just started to use expressjs to create a simply rest API for a university project and I stumble upon it here :)
    Alfredo Severo
    @portal7
    image.png
    Hello! Me too!, Recently started develop in ExpressJS, and i have a question.
    Is there any way to response JSON as XHR instead as Document? I Mean.
    This is the current response with res.json(myobj)
    image.png
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    bienvenidos. welcome @cloudcatwannabe @portal7
    Alfredo Severo
    @portal7
    Gracias @yosiasz !!! / U Welcome!
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    so which response type would xhr fall under. by you saying res.json that is a Document.
    https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType
    Alfredo Severo
    @portal7
    following last link, then i guess that i could change the kind of the function to async in order to follow the specification?
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    yep
    Alfredo Severo
    @portal7
    ok I'll try
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    :pray:
    but not sure what your business case/requirements is that it requires xhr
    Alfredo Severo
    @portal7
    and I'll let you know how it was
    is not necessarily a requirement, just to mimic the original response that I try to replay
    after all, the content is the same.
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    :soccer:
    Alfredo Severo
    @portal7
    changed functions to async and implemented with await, but chromes still showing response type as Document