deployd

Protecting API URL Data from being seen. cURL?

陌路散爱 提交于 2019-12-25 07:14:40
问题 How can we password protect our Deployd data accessed via URL? Currently our users' data is visible on oursite.com/users. How can we make it password protected so that only we,the site developers, can see our users' data via oursite.com/users? (This is my first API and Deployd app.) Many, many thanks! I found the following, if any of these look like they would work: https://www.npmjs.com/package/dpd-curl-proxy https://www.npmjs.com/package/passport-oauth 回答1: Try in your 'get' event if (!me)

Deployd comparison and swift with alamofire

喜你入骨 提交于 2019-12-25 02:59:31
问题 I am trying to query data from my Deployd API with alamofire. How is it possible to do a comparison in a request. I have something like: let parameters = ["number": ["gt": 3]] Manager.sharedInstance.request(.GET, "http://localhost:2403/collections", parameters: parameters).responseJSON { (request, response, result) -> Void in print(result.isSuccess) print(result.data) } But the result is empty. In my dashboard i have a number column with the values: 1,2,3 and 4. So the response should return

Running 'dpd keygen' throws an 'ENOENT' error on heroku

微笑、不失礼 提交于 2019-12-24 12:53:53
问题 I installed deployd on Heroku. When trying to access the dashboard, I get the following message: Use dpd showkey to get your app's key. But running: heroku run dpd keygen gives the following error: { [Error: ENOENT, open '.dpd/keys.json'] errno: 34, code: 'ENOENT', path: '.dpd/keys.json' } Any help would be greatly appreciated. Thanks in advance. 回答1: I solved this issue by adding a ".dpd" folder in my heroku root folder. To be able to commit, you also have to add the following file: ".add/

How to run “Deployd” on port 80 instead of port 5000 in webserver.

时光怂恿深爱的人放手 提交于 2019-12-24 00:09:57
问题 Im running a website with "deployd" and I having issues to change my applicaiton of running on port 5000 to port 80. What I want to do is instead of having "mydomain.com:5000", I just want to have "mydomain.com" Thank you. 回答1: According to these docs of the internal API: http://docs.deployd.com/docs/developing-modules/internal-api/server.html You can pass in an options object when creating the server. So something like this should work var deployd = require('deployd'), options = { port : 80

ES6 and variable scope inside a promise

可紊 提交于 2019-12-20 01:33:52
问题 Not sure what I'm missing here. I need to get the output of data into this.contact . Right now, I'm using a static class variable, but it seems dirty to have to do that. export class contactEdit { static t; // static class var constructor() { this.id = null; this.contact = null; contactEdit.t = this; } activate(id) { this.id = id; let contact = this.contact; // scoped version of class var return dpd.contacts.get(id).then(function(data) { console.log(data); contactEdit.t.contact = data; //

AngularJS: How to use or inject thirdparty lib in AngularJS

五迷三道 提交于 2019-12-07 11:11:19
问题 I'm new to Angular and Deployd and wondering how to use them together. I found the example in Deployd website nice, but it's only consuming rest API data and I'd like to understand how to have Deployd as a service inside AngularJS. For example, keeping all of the clients API up-to-date with the collection's latest data with collection events available in deployd. I came up with the example below, where we can see that I'm using $resource to consume the rest api, but inside the controller

AngularJS: How to use or inject thirdparty lib in AngularJS

不羁的心 提交于 2019-12-05 15:03:02
I'm new to Angular and Deployd and wondering how to use them together. I found the example in Deployd website nice, but it's only consuming rest API data and I'd like to understand how to have Deployd as a service inside AngularJS. For example, keeping all of the clients API up-to-date with the collection's latest data with collection events available in deployd. I came up with the example below, where we can see that I'm using $resource to consume the rest api, but inside the controller "MyCtrl", I'm calling dpd, that I'd like to use to take advantage of features such as http://docs.deployd

ES6 and variable scope inside a promise

荒凉一梦 提交于 2019-12-01 20:42:14
Not sure what I'm missing here. I need to get the output of data into this.contact . Right now, I'm using a static class variable, but it seems dirty to have to do that. export class contactEdit { static t; // static class var constructor() { this.id = null; this.contact = null; contactEdit.t = this; } activate(id) { this.id = id; let contact = this.contact; // scoped version of class var return dpd.contacts.get(id).then(function(data) { console.log(data); contactEdit.t.contact = data; // this works contact = data; // this doesn't }); } } Normally I would create a var contact inside the

Deployd - Data retrieved via AngularJS CORS

余生长醉 提交于 2019-11-27 01:55:39
问题 I am currently reading through "Pro AngularJS" by Adam Freeman. In going through the examples, he has the reader create a sports store app using Angular (of course) with a Deployd server resource. The Deployd resource is set up to return JSON data that is to be populated into the model. I am using NodeJS to run my server. It is currently setup on port 5000 ( http://localhost:5000/sportsstore/app.html ). The Deployd resource is running on port 5500 ( http://localhost:5500/products ). When