express-datafire
v1.0.11
Published
Express DataFire ================
Downloads
30
Maintainers
Readme
Express DataFire
Live-editing & testing of datafire endpoints & scheduled tasks using express.
Usage: as application
$ git clone https://github.com/coderofsalvation/express-datafire
$ cd express-datafire
$ npm install
$ node app.js
Usage: as middleware
$ npm install express-datafire --save
And in your express app:
// Create a new Express application.
var app = express()
var port = process.env.PORT || 3002
var host = process.env.HOST || '127.0.0.1:'+port
require('express-datafire')(app, { port: port, host: host })
app.listen(port, function(){
console.log("listening on "+host)
})
BOOM!
- surf to
/
and you can access your endpoints & features
Getting started video
Why
Disclaimer: I'm not affiliated with datafire, so basically this is fanware
Express-datafire is intended for datafire enthousiast & experimentation, or to simply run datafire-code which shouldn't run on datafire.io. Please go to datafire.io in case you want:
- free hosting of datafire code
- a comfortable, and scalable way of glue-ing together complex dataflows
- share and re-use other people's dataflows
| topic | express-datafire | datafire.io | |-|-|-| | stress testing / monitoring | yes | yes (but may spike pricing tier) | | high volume realtime UDP-data | yes | no | | datafire actions | yes | yes | | datafire tasks | yes | yes | | datafire cli | yes | no | | support for experimental npm modules | yes | no (for obvious reasons) | | scalable | no | yes | | multitenancy | tedious | easy | | create dataflows with existing integrations | tedious | easy | | IoT sensors / hardware access | yes | no | | runs on intranet | yes | no | | offline prototyping | yes | no | | (server) hasslefree | no | yes | | safe for clientwork | no | yes | | work with extremely big files / video encoding | yes | no |
Environment variables
All these are optional:
| environment variable | value | explanation | |----------------------|-------|-------------| | AUTH_USER | test | login name for data-editor at /admin | | AUTH_PASSWORD | test | password for data-editoro at /admin | | AUTH_ENDPOINTS | 1 | set this if you want to enable auth for endpoints too | | SSL_PRIVKEY | privkey.pem | set this to enable SSL | | SSL_CERT | cert.pem | set this to enable SSL | | HOST | 'localhost' | host for swagger-ui to use for testing requests | | PORT | 3002 | port for swagger-ui- to use for testing requests | | DATADIR | './data' | override default data-path for live editable endpoints|
Features
- live editor
- system monitor
- hot reloading of datafire endpoints & scheduled tasks
- export of datafire config + files
- tries to automatically install missing modules
- ssl-ready
Datafire Docs
see here
About Datafire.io
DataFire is a webservice and open source framework for building and integrating APIs. It provides over 350 pre-built integrations, including:
MongoDB • Slack • GitHub • Twilio • Trello • Spotify • Instagram • Gmail • Google Analytics • YouTube
Each integration provides a set of composable actions. New actions can be built by combining existing actions, JavaScript, and external libraries.
Actions are driven by JavaScript Promises, and can be triggered by an HTTP endpoint, on a schedule, or manually.