Code Monkey home page Code Monkey logo

nodyn's Introduction

Build Status

Build Status

Hey, What's Nodyn?

Nodyn is a node.js compatible framework, running on the JVM. It's powered by the DynJS Javascript runtime and Vert.x, the massively scalable, asynchronous, polyglot application platform.

"Why do that?", you may ask. Well, imagine running your node app on the JVM where you immediately have access to all that the Java world has to provide - directly from Javascript. You've got the entire Java ecosystem at your disposal. Since DynJS is cross-language compatible, why not throw in a little JRuby or Clojure with your app if you want. And with Vert.x built in, clustering your applications are a breeze.

Usage

There are two ways to run Nodyn: as a standalone REPL with vertx embedded, or as as a language module in Vert.x.

Running Nodyn as a Vert.x Language Module

By default, Vert.x runs Javascript applications using the Rhino Javascript runtime. But this is configurable in vert.x. You can configure your application to use Nodyn by creating a langs.properties file at the root of your project that looks like this.

nodyn=org.projectodd~nodyn-verticle~0.1.1-SNAPSHOT:org.projectodd.nodyn.NodeJSVerticleFactory
.js=nodyn

Make sure that you have Vert.x 2.x or better installed, and start your application.

$ vertx run myApplication.js

Running Nodyn in Standalone Mode

Nodyn doesn't yet have an initial release. Until then, to use it, you will need to build from source or download a CI SNAPSHOT from Sontype. Download the latest zip file from Sonatype. It will contain a ./bin/nodyn binary. You can use the binary to start an application from a Javascript file, or use the REPL to experiment with small snippets of code on the command line.

$ ./bin/nodyn Usage: nodyn [--console |--debug | --help | --version |FILE] Starts the nodyn console or executes FILENAME depending the parameters

FILE : File to be executed by dynjs --clustered : Run a clustered instance on the localhost --console : Opens a REPL console to test small expressions. --debug : Run REPL in debug mode. --help : Shows current screen. Running without parameters also shows this. --version : Shows current dynjs version.

It is possible to start a small cluster on a single machine by using the --clustered option. For example this will start the REPL in clustered mode.

$./bin/nodyn --clustered --console

Execute this in multiple terminals to experiment with the clustered event bus provided by Vert.x

Building Nodyn

To build nodyn from source, check out the repo, and run mvn install.

$ git clone https://github.com/projectodd/nodyn.git
$ cd nodyn
$ mvn install

API Completion Status

See http://nodyn.io/compatibility

nodyn's People

Contributors

lance avatar bobmcwhirter avatar qmx avatar m0wfo avatar sebastienblanc avatar t-beckmann avatar bnoordhuis avatar danielpassos avatar

Watchers

James Cloos avatar vk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.