Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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

Initiate Mage
Joined
Nov 25, 2017
Messages
55
Reaction score
7
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:junglejane: but i am a great coder:cool:
 
Last edited:
Joined
May 23, 2008
Messages
1,071
Reaction score
574
Re: how to make a nodejs http server that logs all info throwed at it

Check out the , 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.
 
Initiate Mage
Joined
Nov 25, 2017
Messages
55
Reaction score
7
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:
Joined
May 23, 2008
Messages
1,071
Reaction score
574
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

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...?
 
Initiate Mage
Joined
Nov 25, 2017
Messages
55
Reaction score
7
Re: how to make a nodejs http server that logs all info throwed at it

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:laugh:
this whas the piece of code i had to change:
Code:
[COLOR=#D4D4D4][COLOR=#9cdcfe]app[/COLOR].[COLOR=#dcdcaa]use[/COLOR]([COLOR=#569cd6]function[/COLOR]([COLOR=#9cdcfe]req[/COLOR], [COLOR=#9cdcfe]res[/COLOR], [COLOR=#9cdcfe]next[/COLOR]) {
  [COLOR=#dcdcaa]next[/COLOR]([COLOR=#dcdcaa]createError[/COLOR]([COLOR=#b5cea8]404[/COLOR])); // create a 404(Not Found) error
});
[/COLOR]
with this new new code:
Code:
[COLOR=#D4D4D4][COLOR=#9cdcfe]app[/COLOR].[COLOR=#dcdcaa]use[/COLOR]([COLOR=#569cd6]function[/COLOR]([COLOR=#9cdcfe]req[/COLOR], [COLOR=#9cdcfe]res[/COLOR], [COLOR=#9cdcfe]next[/COLOR]) {
  [COLOR=#dcdcaa]next[/COLOR]([COLOR=#dcdcaa]createError[/COLOR]([COLOR=#b5cea8]200[/COLOR])); // make that an 200(OK) Code
});
[/COLOR]
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):junglejane:

i keep this threat open for other issues i have to feel free to help me with them
 
Last edited:
Initiate Mage
Joined
Nov 25, 2017
Messages
55
Reaction score
7
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 poop
 
Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
About next... you can pass a router to next() or nothing at all.
I think you meant to use `res.end()`- unless createError returns an express router.
 
Initiate Mage
Joined
Nov 25, 2017
Messages
55
Reaction score
7
thanks for helping everyone i have been started a other project to i think i am gona halt that one until i have the full src
 
Back
Top