Most servers run on millions of lines of perl, python, or bash. The same things said about JS can be said there, but most of those things are at least as bad with the added problem that they probably run with sudo privileges. JS is at least as good as these languages while being much, much faster.
True dynamically typed code does type checks at runtime which means that performance may suffer, but you are guaranteed to never have critical type failures (the type errors will occur and throw before something actually unsafe happens). This is a huge step up from C which is weakly typed and even untyped via void pointers.
Dynamically typed code is still typed. JS is not an unsafe language from a type perspective and from a security perspective, it may actually have the safest language implementations ever created.
If we're leaving the dynamic scripting language zone, options are very few without becoming tightly bound to Oracle, Microsoft, Google, etc. There are other great open alternatives (for example, SML would be faster with a great type system), but most of those have small communities (which can mean death to open-source projects).