Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    Are you still doing res.json?
    you need to read some more. https://expressjs.com/en/api.html#req.xhr
    just changing the functions to async is obviously not enough
    Santiago Miranda
    @santimirandarp
    Hi there...I've created an app with express-generator
    one of the root files is app.js, but there is also site.js
    but that file is almost empty...it's a file contemplating x509 certificates etc, any idea why it's there?
    Christian Garrovillo
    @cgarrovillo
    How does Express handle subprocesses? Would I cause any issues with the framework if I used the Node.JS modules directly?
    Wilbert Comicho
    @wcomicho_gitlab
    Hi,
    Anyone here tried IIS and NodeJS express with url rewrite? My problem is that the URL Rewrite is re-writing sites that are suppose to be redirected outside my local app.
    Suppose to be like this: res.redirect("external.com/somepath") but its returning "internal.com/somepath".
    da-source
    @da-source

    I'm passing a variable to my template renderer in ExpressJs like so:

    index.js
    app.get('/simple_view/', function(req, res, next){
    title='A TITLE';
    res.render('simple', {
    title: title
    });
    });
    I would like to access the title variable in a JS script on my template page, but I'm getting Uncaught ReferenceError: title is not defined error.

    simple,pug
    script.
    console.log(title);
    How can I solve this?

    Elle Burgess
    @develleoper
    does anybody know if 5.0 is ever slated for release? there's tracker issues claiming a series of "summer of this year" and "end of this year" estimates since 2019
    and i just really want to stop having to worry about manual async error handling 😥
    Caleb David
    @microworlds
    Hello all! :raised_hands: I am a noob. Are there any frameworks/resources for building Chrome extensions with Vue js using the latest Chrome manifest_version: 3? Thanks in advance. This framework: https://github.com/Kocal/vue-web-extension seems unmaintained and does not support manifest v3