Issues Post for the Express side of my Valkarie Crusade Private server development

Results 1 to 7 of 7
  1. #1
    A Walking Kernel panic panicdotc is offline
    WTF? Overkill!Rank
    Nov 2017 Join Date
    HellLocation
    19Posts

    Post Issues Post for the Express side of my Valkarie Crusade Private server development

    so i have talked about my issues regarding the logging of connected urls(Fixed thanks to timebomb) and the removal of all 404 errors(fixed by myself didnt work sadley)
    this post is for the Express code used in my server since i aint no expert on express but i am a great coder
    Last edited by panicdotc; 1 Week Ago at 07:22 PM. Reason: new title and post reason
    I beleve in the power of mmo fans and mmo modders


  2. #2
    Programmer TimeBomb is offline
    ModeratorRank
    May 2008 Join Date
    United StatesLocation
    1,261Posts

    Re: how to make a nodejs http server that logs all info throwed at it

    Check out the morgan middleware, it's awesome for request logging in express. Moving this thread to the main section since logging in an http server isn't all that related to reverse engineering.

  3. #3
    A Walking Kernel panic panicdotc is offline
    WTF? Overkill!Rank
    Nov 2017 Join Date
    HellLocation
    19Posts

    Re: how to make a nodejs http server that logs all info throwed at it

    seems like it will fix my logging issue know any solusions on removing the 404 error since it propley crashes VC
    Last edited by panicdotc; 1 Week Ago at 12:22 PM. Reason: formatting fix
    I beleve in the power of mmo fans and mmo modders

  4. #4
    Programmer TimeBomb is offline
    ModeratorRank
    May 2008 Join Date
    United StatesLocation
    1,261Posts

    Re: how to make a nodejs http server that logs all info throwed at it

    Quote Originally Posted by panicdotc View Post
    seems like it will fix my logging issue know any solusions on removing the 404 error since it propley crashes VC
    We can't know what your problem is here unless you elaborate or show us the problem in code. Either way, why do you think it's happening in the first place? Is there an error that you're not catching somewhere, do you not expect it to return 404 in the first place, is someone accessing a page they shouldn't be on your server, or...?

  5. #5
    A Walking Kernel panic panicdotc is offline
    WTF? Overkill!Rank
    Nov 2017 Join Date
    HellLocation
    19Posts

    Re: how to make a nodejs http server that logs all info throwed at it

    Quote Originally Posted by TimeBomb View Post
    We can't know what your problem is here unless you elaborate or show us the problem in code. Either way, why do you think it's happening in the first place? Is there an error that you're not catching somewhere, do you not expect it to return 404 in the first place, is someone accessing a page they shouldn't be on your server, or...?
    i had to figure out where the error handling of the 404 error whas but i figured out myself sothe issue is fixed
    this whas the piece of code i had to change:
    Code:
    app.use(function(req, res, next) {
      next(createError(404)); // create a 404(Not Found) error
    });
    
    with this new new code:
    Code:
    app.use(function(req, res, next) {
      next(createError(200)); // make that an 200(OK) Code
    });
    
    butadded the feature but it didnt prvend VC from spitting out errors sadly
    well at least i changed it from error 7(Networking issue) to a nice classy Error 2(also a networking failure)

    i keep this threat open for other issues i have to feel free to help me with them
    Last edited by panicdotc; 1 Week Ago at 07:17 PM. Reason: extra info
    I beleve in the power of mmo fans and mmo modders

  6. #6
    Veni, Vidi, Vici Arcelor is offline
    Alpha MaleRank
    Jan 2010 Join Date
    Delhi, IndiaLocation
    1,791Posts

    Re: Issues Post for the Express side of my Valkarie Crusade Private server developmen

    Why don't you just redirect * to a custom page instead of throwing an error?

  7. #7
    A Walking Kernel panic panicdotc is offline
    WTF? Overkill!Rank
    Nov 2017 Join Date
    HellLocation
    19Posts

    Re: Issues Post for the Express side of my Valkarie Crusade Private server developmen

    Quote Originally Posted by Arcelor View Post
    Why don't you just redirect * to a custom page instead of throwing an error?
    this whas easier also code 200 is not a error its OK i tried removing it but that did some funky shit
    I beleve in the power of mmo fans and mmo modders



Advertisement