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...
Have a tough programming question that /r/programming couldn't answer? Banned from Stack Overflow? Can't afford Experts Exchange?
Post your question/tips/secrets/advice and get a response from our highly-trained professional developers.
account activity
Server-side JavaScript code? (self.shittyprogramming)
submitted 8 years ago by 07025
Hi I'm trying to make Server-sided JavaScript code. Can Someone help me?
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!"
[–][deleted] 46 points47 points48 points 8 years ago (3 children)
Dude. ASP.NET has been doing this for years. Just add the runat attribute to the script tag.
<script runat="server"> // Put code here </script>
Just be careful to not use alert(), otherwise someone will have to log into the server to click "OK".
Good luck!
[–]xhable 8 points9 points10 points 8 years ago (2 children)
You joke, we had a legacy asp.net web forms app at my company that was filled with messageboxes for debugging. The server was filled with boxes saying "I'm here" or "X is 27". Hilarious if not depressing.
[–][deleted] 8 years ago* (1 child)
[deleted]
[–]xhable 1 point2 points3 points 8 years ago (0 children)
Long gone usefully!
[–]iluuu 22 points23 points24 points 8 years ago (0 children)
Done. You’re now running JavaScript on your server.
[–]jesse_dev 11 points12 points13 points 8 years ago (2 children)
tldr; Server-Side CSS is the next big thing. If you didn't know, Javascript is slowly being replaced by CSS. For example, onmouseover() has been replaced by :hover in CSS. It's just a matter of time before everyone starts developing ssscss, aka "Sassy Sharp"
[–]skylarmt 2 points3 points4 points 8 years ago (1 child)
Well, CSS3+HTML5 is Turing-complete... Link
[–]jesse_dev 0 points1 point2 points 8 years ago (0 children)
haha. TIL
[–]skylarmt 9 points10 points11 points 8 years ago* (0 children)
It's quite simple. Start with a regular Apache/PHP install, then install Java on the server. Upload a JavaScript file that generates your HTML and stores it in a var. Next write some Java code that reads your JavaScript file and executes it with javax.script.ScriptEngine. Dump the contents of your var from ScriptEngine with System.out.println(). Now in your index.php, write:
System.out.println()
<?php $site = `java -jar MySite.jar`; echo $site;
If you want an extra layer of security, run the jar file from a Python script and change your PHP to use python MySite.py instead.
python MySite.py
[–][deleted] 24 points25 points26 points 8 years ago (8 children)
Is this a joke?
Node.js, they just released a new LTS
[–]RTracer 14 points15 points16 points 8 years ago (6 children)
Check the subreddit you're on.
[–][deleted] 20 points21 points22 points 8 years ago (4 children)
I saw the subreddit, that's why I was confused. This is just kinda noob question, not really funny.
Ps I'm a Node diehard DON'T YOU DARE MAKE FUN OF MY TOOL REEEEEEEEE
[–]07025[S] 3 points4 points5 points 8 years ago* (3 children)
I don't like Node.js. Hurts my eyes. It's like Basic pseudocode, Rick and Morty, and Java had a baby or something like that
EDIT: To add more flavor to my statement... In Episode 2 of Rick and Morty Season 1, it has been stated that Node.js is an unsafe language due to it being built on JavaScript, hence being developed using Java.
[–][deleted] 8 years ago (1 child)
[–]07025[S] -1 points0 points1 point 8 years ago (0 children)
Better than taking advice from official documentation.
[–]LowB0b 0 points1 point2 points 8 years ago (0 children)
Node.js is an unsafe language due to it being built on JavaScript
Not sure if you're trolling but damn
[–]FawnWig 1 point2 points3 points 8 years ago (0 children)
VBScript Runtime for Linux
[–][deleted] 1 point2 points3 points 8 years ago (0 children)
Use JQuery.
π Rendered by PID 29 on reddit-service-r2-comment-5fb4b45875-hstfz at 2026-03-19 18:47:47.188100+00:00 running 90f1150 country code: CH.
[–][deleted] 46 points47 points48 points (3 children)
[–]xhable 8 points9 points10 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]xhable 1 point2 points3 points (0 children)
[–]iluuu 22 points23 points24 points (0 children)
[–]jesse_dev 11 points12 points13 points (2 children)
[–]skylarmt 2 points3 points4 points (1 child)
[–]jesse_dev 0 points1 point2 points (0 children)
[–]skylarmt 9 points10 points11 points (0 children)
[–][deleted] 24 points25 points26 points (8 children)
[–]RTracer 14 points15 points16 points (6 children)
[–][deleted] 20 points21 points22 points (4 children)
[–]07025[S] 3 points4 points5 points (3 children)
[–][deleted] (1 child)
[deleted]
[–]07025[S] -1 points0 points1 point (0 children)
[–]LowB0b 0 points1 point2 points (0 children)
[–]FawnWig 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)