Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cra-middleware

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cra-middleware

Run a create-react-app as a connect middleware.

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

cra-middleware

Run a create-react-app as a connect middleware.

This is mainly a proof of concept.

Usage

  1. Create an app with create-react-app.
  2. Instantiate cra-middleware with the path to your app.
const express = require('express');
const path = require('path');
const craMiddleware = require('cra-middleware');

const app = express();
app.get('/api/hello', (req, res) => res.send('world'));
app.use('/', craMiddleware(path.resolve(__dirname, '../my-app')));
app.listen(3000);

To Do

  • Needs better interfacing with the subprocess. It would be nice to have some ready/compile/error events.
  • Still seems to block node from cleanly exiting.
  • Hooks?
  • Logging options?

FAQs

Package last updated on 22 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc