Miss any of our Open RFC calls?Watch the recordings here! »

This version has been deprecated

Author message:

insecure shrinkwrap urls fixed in 0.6.0 [http://blog.npmjs.org/post/154400916805/avoid-http-urls-in-shrinkwrap-files]


0.0.21 • Public • Published


faas.io is a set of application services to help rapidly develop new apps. It is a cloud development platform that is secure, scalable and reliable.

This npm module augments the faas.io JS library to provide foundation services on the server side.

Installation & Setup

First, install the library in your node project:

npm install faas --save

In order to have the best experience with faas.io, it is recommended that you simply make the faas.io tools available globally (and use a capitalization convention to make it stand out).

global.Faas = require('faas');

You should do this at the top of your main app entry point, probably app.js.

If you prefer not to use global settings like that, you are free to include (require) the faas module in any file as you would normally with nodejs.

faas.io provides several useful tools to help you out. Here's a recommended setup to get the most out of Faas:

global.Faas = require('faas'); // Load the toolbox.

// Configure it with your credentials.
  apiKey: '<<< YOUR FAAS API KEY >>>',
  apiSecret: '<<< YOUR FAAS API SECRET >>>'

// Use the Faas env config service to help with cumbersome app setup.


  // Initialize your app.

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

  app.set('port', Faas.env.PORT); // <-- Example Faas.env usage here.

  app.use(express.cookieParser(Faas.env.COOKIE_SECRET)); // <-- And here.

  // Use the Faas middleware for user authentication.

  // ... other app code ...

  // Start your app.

Check out the docs for the individual Faas services to learn more about how each of them can save you time and effort.


=== User Authentication

In your main node.js Express application file (e.g. app.js), add the faas middleware. The application credentials are available on your Dashboard when you register.


app.use(Faas.io()); // <-------- Insert this code


In your server side code (e.g. Express routes), the securely verified faas.io elements are available in the request session.


Use these variables to build user-specific application logic.

=== Environment configuration

Call Faas.env(callback) to get access to a highly configurable environment settings service, featuring cascading settings and multiple inheritance. By the time the callback is fired, Faas.env will be loaded with the appropriate settings for your environment, including settings that are specified in your process.env. You can switch which group of settings you want to use via the FAAS_ENV variable, e.g.:

FAAS_ENV=staging node app.js

More documentation for Faas.env and the environment configuration service can be found in the source, env.js.




npm i [email protected]





Last publish


  • avatar