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

magnetic-express

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magnetic-express

Magnetic Express is an Express middleware for Magnetic - a tool that makes it easy for you to add automatic server-side static rendering to your dynamic single-page app.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

magnetic-express

Magnetic Express is an Express middleware for Magnetic - a tool that makes it easy for you to add automatic server-side static rendering to your dynamic single-page app.

Your site must use URL fragments in the format of #!/path in order for crawlers to automatically request the corresponding paths at /?_escaped_fragment_=/path.

The Magnetic middleware will detect these requests and start a headless browser using Horseman and PhantomJS to render the corresponding #!/path page of your site.

These rendered pages will then be returned in the response to the crawler.

Example

var express = require('express');
var magnetic = require('magnetic-express');

var app = express();
app.get('/', magnetic());

Now any GET request to / that contains an _escaped_fragment_ query string parameter will be rendered to static HTML by Magnetic.

Keywords

FAQs

Package last updated on 16 Jul 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

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