Hello Back4app
I'm testing back4app, and having issues getting webhooks to works.
app.get('/hello', function(request, response) {
response.send('Hello World!');
});
The same thing with Back4app results in consistently getting {error:unauthorized}...
Here is my app.js file
var express = require('express');
var path = require('path');
var _ = require('underscore');
var bodyParser = require('body-parser');
var mailgun = require('mailgun-js')({apiKey: "key-xyz", domain: "xyz"});
var moment = require('moment');
var app = express();
// Global app configuration section
app.set('views', './views'); // Specify the folder to find templates
app.set('view engine', 'ejs'); // Set the template engine
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended:false}));
app.use(express.static(path.join(__dirname,'public')));
app.get('/whatever', function(req, res) {
var query = new Parse.Query("foobar");
query.exists('user');
query.include("user");
query.limit(200);
query.find().then(function(results){
res.send(results);
}, function (error) {
res.send(500,error.message);
});
});
app.get('/hello', function(request, response) {
response.send('Hello World!');
});
app.listen();
Any idea what I did wrong?