faas
v0.7.2
Published
Faas.io blind proxy real-time API pipeline.
Downloads
43
Readme
Faas
Faas is a cloud service that provides a blind proxy and secure real-time pipeline to reach APIs running on sensitive systems behind a firewalled network or closed system without requiring any inbound ports or web servers to be exposed to the internet.
This npm module provides the libraries needed to serve an API from a client system.
Installation & Setup
Quick-Start Demo: Node.js
In your project directory, install the faas library:
npm install faas
Generate a simple demo startup script and API files:
./node_modules/faas/demos/node/generate.sh # OR `npm root`/faas/demos/node/generate.sh
This creates the file
./faas_demo_start.sh
and thefaas_demo_apis
directory.Start your API server:
./faas_demo_start.sh
Open a browser to https://api.faas.io/demo and watch your API server in action!
Quick-Start Demo: Java
In your project directory, install the faas library:
npm install faas
Generate a simple demo startup script and API files:
./node_modules/faas/demos/java/generate.sh # OR `npm root`/faas/demos/java/generate.sh
This creates the file
./faas_demo_start.sh
, and thefaas_demo_apis
directory.Start your API server:
./faas_demo_start.sh
Open a browser to https://api.faas.io/demo and watch your API server in action!
Quick-Start Demo: Ruby
In your project directory, install the faas library:
npm install faas
Generate a simple demo startup script and API files:
./node_modules/faas/demos/ruby/generate.sh # OR `npm root`/faas/demos/ruby/generate.sh
This creates the file
./faas_demo_start.sh
, and thefaas_demo_apis
directory.Start your API server:
./faas_demo_start.sh
Open a browser to https://api.faas.io/demo and watch your API server in action!
Quick-Start Demo: HTTP Proxy
In your project directory, install the faas library:
npm install faas
Generate a simple demo startup script and API files:
./node_modules/faas/demos/http-proxy/generate.sh # OR `npm root`/faas/demos/http-proxy/generate.sh
This creates the file
./faas_demo_start.sh
, and the./app.js
demo app.Start your API server:
./faas_demo_start.sh
Open a browser to your demo url (https://faasdemo-XXXXXXXX.http-proxy.faas.io/) and watch your proxy in action!
Intel Edison
Edison Quick-Start & Demo
Configure your Edison to connect to your WiFi network.
Install faas from a terminal on your Edison:
npm install faas
Generate a simple demo startup script and API files:
./node_modules/faas/demos/edison/generate.sh # OR `npm root`/faas/demos/edison/generate.sh
This creates the file
./faas_demo_start.sh
and thefaas_demo_apis
directory.Start the API on your Edison by running:
./faas_demo_start.sh
Open a browser to https://api.faas.io/demo and enter your device key. You should now be able to turn the LED on your board on and off. That's it!
Tip: The "DEVICE KEY" was printed to your screen when you started the command in Step 3. This is your Edison serial number, which can also be found on a physical label on your Edison, or in the file /factory/serial_number.
Extra Credit: Start on boot and restart on error
To enable your API to start whenever you boot your Edison (without needing to log in to it), you can run the following:
./node_modules/faas/demos/edison/install_service.sh
This does a few things:
Copies the demo apis to
/home/root/faas_api
.Installs faas there (
npm install faas
).Creates a script to run your api at
/home/root/faas_api/run_faas_api.sh
.Creates a systemd service file to point to your script at
/lib/systemd/system/faas.service
.Enables this service to start automatically on boot via
systemctl enable faas
.
For more info, go to faas.io