This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mbaasApi = require('fh-mbaas-api'); | |
var fh = mbaasApi; | |
var express = require('express'); | |
var mbaasExpress = mbaasApi.mbaasExpress(); | |
var cors = require('cors'); | |
// list the endpoints which you want to make securable here | |
var securableEndpoints; | |
securableEndpoints = ['/hello']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var cors = require('cors'); | |
var soap = require('soap'); | |
var csv = require('csv'); | |
function helloRoute() { | |
var hello = new express.Router(); | |
hello.use(cors()); | |
hello.use(bodyParser()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fh.cloud({ | |
"path": "/somePath", | |
"method": "POST|GET|PUT|DELETE", // optional - default GET | |
"contentType": "application/json", // optional - default shown | |
"data": { "username": "testuser"}, // optional - request body | |
"timeout": 60000 // optional - default shown | |
}, function(res) { | |
// Success - your response will be in the "res" variable | |
}, function(msg,err) { | |
// Failure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FORMAT: 1A | |
HOST: https://cclarke-knicvuxlxposc3rdani5lso7-demos-dev.mbaas2.tom.redhatmobile.com | |
# Login Service | |
Login service example | |
# Group Entries Tracker API | |
# login [/login] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first npm install --save apib2swagger | |
var apib2swagger = require('apib2swagger'); | |
var fs = require('fs'); | |
app.get('/api.json', function(req, res){ | |
fs.readFile('./README.md', function(err, file){ | |
if (err){ | |
return res.status(500).json(err); | |
} | |
apib2swagger.convert(file.toString(), function(err, converted){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FIRSTSEEN LASTSEEN COUNT NAME KIND SUBOBJECT REASON SOURCE MESSAGE | |
49m 49m 1 fh-mbaas-1-deploy Pod Scheduled {scheduler } Successfully assigned fh-mbaas-1-deploy to ip-10-0-0-235.ec2.internal | |
49m 49m 1 fh-mbaas-1-deploy Pod implicitly required container POD Pulled {kubelet ip-10-0-0-235.ec2.internal} Container image "openshift3/ose-pod:v3.1.1.6" already present on machine | |
49m 49m 1 fh-mbaas-1-deploy Pod implicitly required container POD Created {kubelet ip-10-0-0-235.ec2.internal} Created with docker id ba1b75db0435 | |
49m 49m 1 fh-mbaas-1-deploy Pod implicitly required container POD Started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: OS-Regular; | |
src: url('fonts/OpenSans-Regular.ttf'); | |
} | |
@font-face { | |
font-family: OS-Light; | |
src: url('fonts/OpenSans-Light.ttf'); | |
} | |
@font-face { | |
font-family: OS-Bold; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mbaasApi = require('fh-mbaas-api'); | |
var express = require('express'); | |
var mbaasExpress = mbaasApi.mbaasExpress(); | |
var cors = require('cors'); | |
// list the endpoints which you want to make securable here | |
var securableEndpoints; | |
securableEndpoints = ['/hello']; | |
var app = express(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/fd', function(req, res){ | |
var fs = require('fs'); | |
fs.readdir('/proc/self/fd', function(err, list) { | |
if (err) { | |
return res.status(500).json(err); | |
} | |
return res.end(list.length.toString()); | |
}); | |
}); |