a toolkit for building realtime APIs
the simplest way to build an api.
⚠️ Deployd is not actively maintained anymore. Important bug fixes PRs will be merged (if properly tested and documented) but the existing maintainers don't have time and motivation to build new features.
Deployd is the simplest way to build realtime APIs for web and mobile apps. Ready-made, configurable Resources add common functionality to a Deployd backend, which can be further customized with JavaScript Events.
⚠️ Deployd v1.0.0 has been released. Read the migration guide below.
Deployd is built using node and published using npm.
To install and use it, you need to install Node.JS.
$ npm install deployd-cli -g $ dpd create hello $ cd hello $ dpd -d
dpdcommand. Read more here.
Dpdis only meant to be used as a quick prototyping tool.
You are encouraged to structure your resources in a hierarchy based on what they belong to. Since deployd 1.1.0 you can name your resources like the following example:
users
users/photos.
users/photos/resize.
Once your project grows, you may find yourself writing code in one place that you need elsewhere. Take a look at dpd-codemodule for this purpose.
Keep in mind that
deploydcomes with absolutely no built-in access control checking. Anyone can delete, read, or update any information from any collection unless you close this down. We recommend plugging in your permission checks in
On BeforeRequestevents, and/or other appropriate places.
The dpd-clientlib package is provided mostly as a convenience and should probably not be used directly in production. Once your project outgrows it, feel free to replace it with something else. You may use any HTTP library and/or socket.io client implementation to interact with deployd. Please see the documentation for more information.
You will find plugins for various sorts of tasks on npm if you search for
dpd. Deployd plugins start with dpd-name
You can use
deploydin a cluster configuration. In order for the socket.io adapter to be able to emit to clients on other cluster nodes, you will need to use Redis as a pub/sub server. See here for more information.
Try not to run
dpd.somecollection.get()type queries inside
On GEThandlers.
## Other notes:
emit(dpd.users, {active: true}, 'postModified', this);) are inefficient and should be avoided. Instead you should join sessions to rooms and emit to rooms instead. See PR 698 for more info.
server:setsessionmessage on the socket, with a payload of
{sid: 'sessionid'}. You can get the session id by calling the
loginmethod of the user collection resource. See the documentation for more information.
v1.0.0 contains a big refactoring: the CLI, dashboard and client-lib has been extracted from the core to allow easier contributions and maintainability.
Here's a guide to help you migrate to v.1.0.0.
If you start your application using a node script (recommended), you just need to update the
deployddependency and add the missing ones (client-lib and dashboard).
$ npm install [email protected] --save $ npm install dpd-dashboard dpd-clientlib --save-dev
If you use the CLI to start your app (using
dpdinside your app folder), you will need to uninstall the old global version of
deploydand install
deployd-cli.
npm uninstall deployd -g && npm install deployd-cli -g
If you have trouble making it work, feel free to ask for help on the chat.
Once Node.JS is installed, open your terminal and type the following command:
npm install deployd-cli -g
the
dpdcommand should be available. Type
dpd -Vand the current version should appear.
The windows installer is deprecated. The recommended way is now npm (
npm install deployd-cli -g) and install mongodb separately.
The macosx installer is deprecated. The recommended way is now npm (
npm install deployd-cli -g) and install mongodb separately.
git clone https://github.com/deployd/deployd.git npm install
cd deployd mongod & npm test
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 deployd llc