Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Kal Sze
    @ksze
    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
    verlainek83
    @verlainek83

    hi everybody, i have this bug whan i want to start my app: Too many tables; MySQL can only use 61 tables in a join

    SequelizeDatabaseError: Too many tables; MySQL can only use 61 tables in a join
    at Query.formatError (/home/elodie/tfe/placetopark/node_modules/sequelize/lib/dialects/mysql/query.js:265:16)
    at Query.run (/home/elodie/tfe/placetopark/node_modules/sequelize/lib/dialects/mysql/query.js:77:18)
    at processTicksAndRejections (internal/process/task_queues.js:97:5).

    verlainek83
    @verlainek83
    my app work with expressjs sequelize and MySql
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    Do you really need to join to 61 tables? Most unsual
    verlainek83
    @verlainek83
    i have join 13 tables and after that the error occurs
    in my class diagram i have 15 tables, but for start running the app i create 13 tables
    i don't know why i have this error
    Kal Sze
    @ksze
    Can somebody explain to me how I fix this CORS-related error that I see in Firefox? "Reason: header ‘access-control-allow-origin’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response"
    1 reply
    I'm using expressjs and its cors middleware.
    I have already added this before any of my routes in my server code:
    app.use(cors({
          methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
          origin: [myOrigin1, myOrigin2],
          allowedHeaders: ['Access-Control-Allow-Origin'],
    }));
    Kal Sze
    @ksze
    Or how can I make morgan log every request header that it receives? I'm not suspecting that something between my backend and the frontend is mangling the requests.
    e.g. the reverse proxy/load balancer/api gateway
    Levi Richardson
    @lerichardson
    Hi, I'm having a weird issue, wondering if someone could help me out
    Ghost
    @ghost~5c363bf4d73408ce4fb42605
    Would you like to tell us about it? We are at edge of our seats
    Zircoz
    @Zircoz
    lol
    WORMSS
    @WORMSS
    I feel ashamed a Richardson would ask to ask a question. (oh, I forgot my name on here is WORMSS and not my real name.. I am also a Richardson)
    Joe Pea
    @trusktr
    Anyone know how to make express.static serve symlinked files?
    When a file is a symlink, it doesn't work.