react-app-server-runtime

0.5.1 • Public • Published

react-app-server-runtime

DEPRECATION WARNING: This is not maintained anymore, please use react-quickstart instead.

Node.js based runtime to evaluate client side code in. By default provides minimalistic sandboxed runtime via vm Node's module.

Installation

% npm install react-app-server-runtime

Usage

Basic usage:

var evaluate = require('react-app-server-runtime');

evaluate('__callback(null, "hello!");', function(err, message) {
  console.log(message); // outputs "hello!"
});

More complex usage:

var evaluate = require('react-app-server-runtime');

var task = {
  bundle: '...',    // code bundle, built with browserify for example
  code: '...',      // some code to execute after bundle
  debug: true       // should we try to extract source maps from bundle
  sourceMap: ...    // or we can provide SourceMapConsumer directly
}

evaluate(task, function(err, message) {
  console.log(message); // outputs "hello!"
});

/react-app-server-runtime/

    Package Sidebar

    Install

    npm i react-app-server-runtime

    Weekly Downloads

    1

    Version

    0.5.1

    License

    MIT

    Last publish

    Collaborators

    • andreypopp