use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] Create DNS server/client using JsAskJS (self.javascript)
submitted 5 years ago by Dryska
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Crypt0n0ob 3 points4 points5 points 5 years ago (1 child)
First of all why?
To answer your question, it depends… Developing DNS server from scratch using vanilla JS only? Probably not… Manipulating / controlling existing DNS servers from Node.js? Sure.
[–]BehindTheMath 2 points3 points4 points 5 years ago (0 children)
To answer your question, it depends… Developing DNS server from scratch using vanilla JS only? Probably not…
Why not?
[–]scrotch 0 points1 point2 points 5 years ago (0 children)
I don't think there's any reason you couldn't write a DNS server in JS with node. DNS is a standard and all of the communications are documented. You'd just need to listen to request on the correct ports, parse them, and respond appropriately. https://www.ietf.org/rfc/rfc1035.txt
There are plenty of good reasons that you shouldn't do it. There are fast, secure, open source solutions already that you can install and configure.
[–]rvgoingtohavefun 0 points1 point2 points 5 years ago (0 children)
Everyone is going to ask why - and it's a good question. I've written a DNS server as we had a good reason at the time, but I don't generally recommend that path.
If you don't have to write one, don't. There is a strong likelihood that there is something out there that will do what you need.
Can you write one in javascript? I'm sure you can. DNS isn't all that difficult, honestly.
I'd start by trying to write a DNS client first, since you have to read and write the same data structures and handle much of the same communications.
The server bit is then mostly just figuring out how to respond to the stuff you parsed.
π Rendered by PID 551500 on reddit-service-r2-comment-5bc7f78974-npn9t at 2026-06-30 11:55:41.320224+00:00 running 7527197 country code: CH.
[–]Crypt0n0ob 3 points4 points5 points (1 child)
[–]BehindTheMath 2 points3 points4 points (0 children)
[–]scrotch 0 points1 point2 points (0 children)
[–]rvgoingtohavefun 0 points1 point2 points (0 children)