Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am fbuecklers on github.
  • I am fbuecklers (https://keybase.io/fbuecklers) on keybase.
  • I have a public key ASApsy8VR6CxlxBttjLKOU9RWNxp5Qb9KeAprDJucJ22Hwo

To claim this, I am signing this object:

@fbuecklers
fbuecklers / createType.js
Created November 20, 2017 10:39
Create a new Baqend type with the JS-SDK programmatic
var appName = 'your-app-name';
var emf = new DB.EntityManagerFactory({host: appName});
emf.createEntityManager(true).ready().then(function(em) {
// the adminUser needs at least subclassing rights on the Object class
return em.User.login('adminUser', 'password');
}).then(function() {
var metamodel = emf.metamodel;
// create a new metamodel for the type and extend from Object
var personType = new DB.metamodel.EntityType("Person", metamodel.entity(Object));
@fbuecklers
fbuecklers / job.js
Last active August 14, 2017 13:45
Job Baqend Code
exports.get = function(db, req, res) {
res.json({status: status()});
}
exports.post = function(db, req, res) {
switch (req.body.action) {
case 'start':
startJob(db);
break;
case 'stop':
@fbuecklers
fbuecklers / job.js
Created August 14, 2017 13:41
Job Baqend Code
exports.get = function(db, req, res) {
res.json({status: status()});
res.send();
}
exports.post = function(db, req, res) {
switch (req.body.action) {
case 'start':
startJob(db);
break;
@fbuecklers
fbuecklers / image.js
Created June 27, 2017 12:38
Baqend Image resizer
/* Require additional modules and handlers here */
var lwip = require('lwip');
var http = require('http');
var https = require('https');
var IMG_OPTIONS = {
jpeg: {
quality: 80,
},
png: {
@fbuecklers
fbuecklers / gist:872cec4b807c497905ce5b318121cf83
Created September 8, 2016 12:05
SPQR: Speaker Question Round Talks
Test