View all files | ||||
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.
Once you start writing anything serious, you should start your project using a node script instead of the dpd command. Read more here. Dpd is 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:
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 deployd comes 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 BeforeRequest events, 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 deployd in 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 GET handlers.
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 deployd dependency and add the missing ones (client-lib and dashboard).
If you use the CLI to start your app (using dpd inside your app folder), you will need to uninstall the old global version of deployd and 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:
the dpd command should be available. Type dpd -V and 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.