Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
the simplest way to build an api.
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
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:
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 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.
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:setsession
message on the socket, with a payload of {sid: 'sessionid'}
. You can get the session id by calling the login
method 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 deployd
dependency and add the missing ones (client-lib and dashboard).
$ npm install deployd@latest --save
$ npm install dpd-dashboard dpd-clientlib --save-dev
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:
npm install deployd-cli -g
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.
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 at
http://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
1.1.0 (2017-11-04)
Notes: dpd-dashboard and dpd-clientlib now follow semver too. Please update their semver ranges in your project to ^1.0.0
Allow specifying resources in subdirectories/namespaces. (eg. namespace/hello) (#832) (4d22465b)
What this does is allow structuring resources in subdirectories. (eg clientapi/users, clientapi/photos, clientapi/v2/followers, etc)
This greatly improves the structure of projects, allowing easier separation of functions into their own separate concerns.
Each can have its own separate event code and deployd will handle the routing. This should work for any resource type.
<a name="v1.0.0"></a>
FAQs
the simplest way to build realtime APIs for web and mobile apps
The npm package deployd receives a total of 37 weekly downloads. As such, deployd popularity was classified as not popular.
We found that deployd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.