0.0.10 • Published 5 years ago

enfunc-runtime v0.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Enfunc

Build Status Build Status FOSSA Status npm.io npm.io npm.io npm.io

Open-source self-hosted serverless experience with high-availability power-up's

:rocket: Quick start

# install it on the cluster
wget https://raw.githubusercontent.com/enteam/enfunc/master/docker-compose.yml
docker-compose up -d

Deploy the your first serverless app in seconds

# install the enfunc-cli
yarn global add enfunc-cli

Create new app

# create new npm project

Then, you can write some cloud functions code!

// src/index.js
const runtime = require('./runtime.js');
module.exports.helloWorld = runtime.functions.onRequest(async (req, res) => {
  res.json({
    message: 'Hello World!'
  })
});

The runtime.js file you can grab from https://raw.githubusercontent.com/enteam/enfunc/master/runtime.js

# Deploy your app
export ENFUNC_HOST=http://<yourEnfuncNodeAddress>:<yourEnfuncNodePort> # without a trailing slash
enfunc deploy --app my-first-app

And... Yup! Your first serverless enfunc app is accessible from http://<yourEnfuncNodeAddress>:<yourEnfuncNodePort>/functions/invoke/my-first-app/helloWorld

License

FOSSA Status