function-to-app

0.0.1 • Public • Published

function-to-app

Transform a function into a Node.js application.

This is an experiment

How to use

Write a module that exports a function, for example an index.js file exporting a function hello:

exports.hello = (req, res) => {
    res.status(200).send('Hello World');
};

In your package.json, add function-to-app as dependency:

npm i function-to-app

In your package.json file, use the func executable as the start command:

"scripts": {
    "start": "func hello"
},

Options

func <NAME> --entry-point <FUNCTION_NAME>

Readme

Keywords

none

Package Sidebar

Install

npm i function-to-app

Weekly Downloads

0

Version

0.0.1

License

Apache-2.0

Unpacked Size

13.7 kB

Total Files

4

Last publish

Collaborators

  • steren