New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

freezeray

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

freezeray

Scrape your express app to generate static files.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

freezeray

Scrape your express app to generate static files.

Getting Started

Install the module with: npm install freezeray

var freezeray = require('freezeray'),
	app = require('./app'),
	options = {},
	cb = function(err) {};

freezeray(app, options, cb);

Methods

freezeray(app, options={}, callback)

app should be an Express app. Freezeray will manage the server so please don't start it.

options should be an object of any of the following:

  • publishDir: Where do you want the static files to end up? Any existing files will be deleted. default: './publish'

  • publicDir: Directory containing assets that should be copied to publishDir. default: './public'

  • serverConfig: An object containing hostname and port. default: { hostname: 'localhost', port: '3456'}

  • verbose: Log what's happening. default: false

callback will be called when it's done or there's an error.

Examples

Sample usage:

process.env.NODE_ENV = 'staging';

var freezeray = require('freezeray'),
	express = require('express'),
	app = express();

app.use(app.router);

app.get('/', function(req, res) {
	res.end('Test');
});

freezeray(app, {
	publishDir: __dirname + '/publish',
	publicDir: __dirname + '/public'
}, function(err) {
	if (err) {
		console.error(err);
	}
	else {
		console.log('Done!');
	}
});

Tests

Install devDependencies and run npm test.

License

Copyright (c) 2012 Chris Jaure
Licensed under the MIT license.

Keywords

FAQs

Package last updated on 18 Sep 2012

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