🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-collider

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-collider

Express middleware for isomorphic express + react apps

1.0.2
Source
npm
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

React-collider

Express middleware for isomorphic express + react apps.

Check out the daily-collider branch for a working example, including data-fetching from the Dailymotion API.

Installation

$ npm install --save react-collider

Usage

Server side

Simply add the server middleware in your express app, giving your routes and the path to the components.

var express  = require('express'),
    path     = require('path'),
    app      = express(),
    port     = process.env.PORT || 3000,
    collider = require('./collider').server

server.use(collider(path.join(__dirname, 'src/routing')))

server.listen(port, function() {
  console.log('Listening on 127.0.0.1:' + port)
})

Client side

Similar: call the client module with your routes and the components' path.

var path = require('path'),
    collider = require('./../collider').client,
    routes = require('./routing')

collider(routes, path.join(__dirname, './components'))

FAQs

Package last updated on 01 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts