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

coffee4clients

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffee4clients

Extends Express.js such that when a .coffee file is accessed through an express server the response is the compiled javascript instead of the source coffeescript

  • 0.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Coffee4Clients

Coffee4Clients allows Express.js to render .coffee files when ?js is appended to their urls.

Example

  • http://localhost:5000/asd.coffee

    alert 'asd'
    
  • http://localhost:5000/asd.coffee?js

    (function() {
      alert("awesome");
    }).call(this);
    

Installing

  1. Install Node.js

  2. Install it

     npm install coffee4clients
    

Using

  • With Node.js in JavaScript

    // Include Coffee4Clients
    require('coffee-script');
    coffee4clients = require('coffee4clients');
    
    // Setup with your Express Server
    coffee4clients.setup({
    	server: null, // your express server (required)
    	publicPath: '...', // the full path to your server root (required)
    	missingAction: false, // the action to forward to when a file is not found
    	cache: false // whether the responses should be cached
    });
    
  • With Node.js in CoffeeScript

    # Include Coffee4Clients
    coffee4clients = require 'coffee4clients'
    
    # Setup with your Express Server
    coffee4clients.setup {
    	server: null # your express server (required)
    	publicPath: '...' # the full path to your server root (required)
    	missingAction: false # the action to forward to when a file is not found
    	cache: false # whether the responses should be cached
    }
    
    

History

  • v0.2 June 29, 2011

    • Now supports multiple instances
    • Has unit tests
    • Requires ?js to be appended to .coffee urls
  • v0.1 May 18, 2011

    • Initial commit

License

Licensed under the MIT License Copyright 2011 Benjamin Arthur Lupton

Keywords

FAQs

Package last updated on 28 Jun 2011

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