@raas/raas

0.1.3 • Public • Published

 Version  Downloads  Issues  Code documentation

raas

Raas

React as a service.

What

Generating html server side is a wonderful idea! You can reuse your client-side React components on the server. You can even emulate on the server a browser environment in order to use the huge amount of client-side libraries that can help you in generating a rich HTML experience.

Why

  • periodic/scheduled reports
  • embed HTML in your email campaigns
  • reuse yor client side components on a server

Installation

Using npm:

$ npm install --save @raas/raas

Easy setup

The following example shows how to startup with a minimal setup with:

  • raas
  • express
  • a HelloWorld react component
import React, { Component } from 'react';
import {
  ReactService,
  ExpressConnector,
  Route,
  Renderers,
  FileStorage
} from '@raas/raas';

import HelloWorldComponent from './HelloWorld';

export default app => {
  const reactService = new ReactService({
    connector: new ExpressConnector({
      application: app
    }),
    routes: [new Route({
      path: '/test/hello-world',
      async: false,
      priority: 0,
      renderer: Renderers.REACT_DOM,
      component: HelloWorldComponent
    }),]
  });
  return reactService;
};

Esdoc

Raas comes with a detailed documentation for developers that can be found in the local folder esdoc

Examples

The example libraries is full of full-fledged examples with Express that will help you in setting up a working server in order to generate the your HTML. Examples are available here

Contributing

Contributions are welcome so please create a pull request when you want to:

  • improve the code or the documentation
  • add a new cool feature
  • fix bugs
  • add new tests

Issues

If you find a bug, please file an issue on our issue tracker on BitBucket.

Package Sidebar

Install

npm i @raas/raas

Weekly Downloads

4

Version

0.1.3

License

MIT

Unpacked Size

5.7 MB

Total Files

117

Last publish

Collaborators

  • raas