nScript

  • 31 Commits
  • 31 Pushes
  • 13 Deploys
Launch Site

nScript

By The Haxe

Screencast
Quick Intro

nScript enables node.js developers to write scripts to dynamically alter the server output, without having to restart the server.

Description

A scripting system for node.js apps.

Judging Instructions

Load http://the-haxe.2013.nodeknockout.com, and log in with the access key "nko13".

Once logged in, you will be able to enable and disable scripts in the left panel. Try editing the scripts and re-ordering them for interesting results.

What they Used

Express.js, Jade, Stylus, jQuery, jQuery UI sortable

Votes

Your Vote

Voting is now closed.

Other Votes

  • (2)
  • contestant

    Is this not just middleware? Although I do appreciate the lighter weight appearance. Maybe there is a better way than re-routing the output through the nscript, perhaps calling nscript functions where appropriate like decorators?

    It seems like an (interesting/maybe bad) idea to make changes from the website. Also, this might have a bad performance hit.

    • hacksparrow
      contestant

      Yes, middleware - which can load JavaScript files without having to restart the server.

      The work done so far is a quick hack, there would be place it could be optimized. Feel free to contribute, when I make the project available on GitHub.

      The web interface for editing the files is for the judges of this competition; else, they'd have to log on to my shell account and fire up the vim editor :)

  • judge

    Samsung

  • judge

    Could be useful for A/B testing too.

    • hacksparrow
      contestant

      Indeed, Dan. I will be open-sourcing the project later.

  • judge

    Innovative idea and the app worked solidly.

    I think the UI could use some polishing but it works.

    A few suggestions:

    It would nice if you let me author my own scripts

    It would be cool if I could do like jQuery selectors against the DOM of the page.

    Think about what a good real world use case for this would be.

    • hacksparrow
      contestant

      You will be able to add your own scripts when you include the module in your app. I disabled script creation in the demo to prevent accidental or intentional creation of meeeeelions of files.

      Great suggestion, I could work on it later.

  • judge

    Browserling

    Pretty innovative.

  • contestant

    Suggest you a editor named Brackets, it's a open source editor for developer. It also has the same features like yours, and it also can import more extensions like jshint, code beautifier, and many templates. Hope this help, keep it up!

    • hacksparrow
      contestant

      I know Brackets. nScript is actually a server side script :) it's an additional layer between routes and views - more powerful than views but less powerful than route handlers.

  • contestant

    This would have been perfect on my site! It would have allowed me to place the missing vote link that I had forgot to place in my last commit. Interesting idea!

    • hacksparrow
      contestant

      Yea, perfect example of a use case. I will be open-sourcing the project later.

  • contestant
  • contestant

    I can't think of an occasion when I'd want to use nScript, but part of the point of a hackathon is trying out new stuff for the sake of it. And based on that this is pretty cool.

    Hoping that the code ends up on github so I can take a look.

    My only suggestion for the web app itself would be a button to revert it to its original state - I edited the title in spanish.js - and can't change it back

    • hacksparrow
      contestant

      Will be open-sourcing it later. Thanks for the ratings and the suggestion. I can't touch the code to implement reversion, else will be disqualified :)

    • mattyw
      contestant

      I understand. Look forward to seeing the code. If you can spare a few minutes I'd appreciate you taking a look at my entry

    • hacksparrow
      contestant

      Done!

  • judge

    I failed to understand the purpose or how it works. There is very limited documentation.

    • hacksparrow
      contestant

      It is a system for developers to add scripting capability to their node.js apps.

  • judge

    Freelancer

    Not clear what is the target audience of this project. I can inject random JS code into your server. For instance, I managed to shut down your server by inserting a "process.exit();" on the content...

    • hacksparrow
      contestant

      It is not for the general public, it is for developers who will be writing the scripts. If a developer decides to do "process.exit()" and it works as expected, his goal is accomplished, but I wonder why anyone would want to do it.

      I assume, you are referring to the "Internal Server Error" message as the server being shut down. If yes, it does not shut down the server, it just a 500 response caused by an undefined variable, you can do the same even with "lul.wut()".

  • contestant

    Attachments.me

  • contestant

    Editora Abril

IMPORTANT DATES

REGISTRATION
SEP 17
COMPETITION
NOV 9-11 UTC
JUDGING
NOV 11-17
WINNERS
NOV 18

Thank you to our Platinum Sponsors