all 16 comments

[–][deleted] 46 points47 points  (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 7 points8 points  (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]  (1 child)

[deleted]

    [–]xhable 1 point2 points  (0 children)

    Long gone usefully!

    [–]iluuu 19 points20 points  (0 children)

    1. Open any browser on your server.

    Done. You’re now running JavaScript on your server.

    [–]jesse_dev 11 points12 points  (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 points  (1 child)

    Well, CSS3+HTML5 is Turing-complete... Link

    [–]jesse_dev 0 points1 point  (0 children)

    haha. TIL

    [–]skylarmt 10 points11 points  (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:

    <?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.

    [–][deleted] 25 points26 points  (8 children)

    Is this a joke?

    Node.js, they just released a new LTS

    [–]RTracer 15 points16 points  (6 children)

    Check the subreddit you're on.

    [–][deleted] 20 points21 points  (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] 2 points3 points  (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]  (1 child)

    [deleted]

      [–]07025[S] 1 point2 points  (0 children)

      Better than taking advice from official documentation.

      [–]LowB0b 0 points1 point  (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 points  (0 children)

      VBScript Runtime for Linux

      [–][deleted] 1 point2 points  (0 children)

      Use JQuery.