🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
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

latest
Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
25
257.14%
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

Using

  • With Node.js in JavaScript

    // Include Coffee4Clients
    require('coffee-script');
    coffee4clients = require('coffee4clients');
    
    // Setup with your Express Server
    coffee4clients.createInstance({
    	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.createInstance {
    	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

javascript

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