Skip to main content

All Questions

3 votes
1 answer
158 views

What is the standard method of handling errors in a NodeJS web app?

I am currently working on a web application as a learning project, which has a NodeJS backend and uses a MongoDB database; however, I believe my question is not specific to the technologies I am using....
ptk's user avatar
  • 185
2 votes
1 answer
1k views

Is it a best practice to use a mocking service for testing http requests?

Is it better to unit test using a mock library like 'nock' (nodejs) or to just test the server's http requests directly? Here is an example of my Express server test for testing if my server is up ...
Dream_Cap's user avatar
  • 139
0 votes
1 answer
225 views

Best practices for creating multiple HTML buttons that are used for a similar purpose

I realize this may be subjective, but I don't see any clear-cut place for asking questions on good software design principals. I'm sure there are some software patterns and anti-patterns I should be ...
Brian C's user avatar
  • 147
7 votes
3 answers
13k views

Why is it a good practice to keep Javascript code in separate files?

In web development we are commonly used to keep Javascript code in separate files, but sometimes we need this Javascript code to manipulate server side data locally. For example, making an Ajax Call ...
TheByeByeMan's user avatar