0.0.7 • Published 4 years ago

@viq/functions v0.0.7

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Cloud Functions | viq.app

Package to create and use viq.app cloud functions

Installation

In your project directory run:

# using yarn
$ yarn add @viq/functions

# using npm
$ npm install @viq/functions

Usage

const functions = require('@viq/functions');

// Express-style request accepting all HTTP methods
functions.path('/helloWorld').onReq((req, res) => {
  res.send('Hello world');
});

// Adding middleware
const someMiddleware = (req, res, next) => {
  req.foo = 'bar';
};

functions
  .path('/foo')
  .mid(someMiddleware)
  .onReq((req, res) => {
    res.send(req.foo); // => 'bar'
  });

module.exports = functions;
0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago