Skip to content

Commit

Permalink
Merge branch 'master' of github.com:deployd/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ritch committed Nov 13, 2012
2 parents 5766d14 + b1a8c1e commit 9e616ca
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 32 deletions.
8 changes: 4 additions & 4 deletions docs/collections/accessing-collections.md
Expand Up @@ -35,9 +35,9 @@ Dpd.js functions are *asynchronous*: they do not return a value, but execute a c
// Work with result
});

For details on using dpd.js, see the [dpd.js reference](./reference/dpd-js.md)
For details on using dpd.js, see the [dpd.js reference](/docs/collections/reference/dpd-js.md)

Also see [A Simple Todo App](./examples/a-simple-todo-app.md) for a working example.
Also see [A Simple Todo App](/docs/collections/examples/a-simple-todo-app.md) for a working example.

### Using dpd.js on a different origin

Expand All @@ -50,6 +50,6 @@ This will not work on browsers that do not support Cross-Origin Resource Sharing

### Accessing Collections without Dpd.js

The dpd.js library is not required; it is only a utility library for accessing Deployd's HTTP API with AJAX. For details on the HTTP API, see the [HTTP API Refernence](./reference/http.md).
The dpd.js library is not required; it is only a utility library for accessing Deployd's HTTP API with AJAX. For details on the HTTP API, see the [HTTP API Refernence](/docs/collections/reference/http.md).

Some front-end libraries include support for HTTP or REST APIs; for examples of how to use these instead of dpd.js, see [A Simple Todo App with Backbone](./examples/a-simple-todo-app-with-backbone.md) and [A Simple Todo App with AngularJS](./examples/a-simple-todo-app-with-angular.md)
Some front-end libraries include support for HTTP or REST APIs; for examples of how to use these instead of dpd.js, see [A Simple Todo App with Backbone](/docs/collections/examples/a-simple-todo-app-with-backbone.md) and [A Simple Todo App with AngularJS](/docs/collections/examples/a-simple-todo-app-with-angular.md)
2 changes: 1 addition & 1 deletion docs/collections/adding-logic.md
Expand Up @@ -5,7 +5,7 @@

## Adding Custom Business Logic with Events

Events allow you to add custom business logic to your Collection. By writing Events, you can add validation, relationships, and security to your app. Events are written in JavaScript (specifically, the ECMAScript 5 standard) and have access to the [Collection Events API](./reference/event-api.md).
Events allow you to add custom business logic to your Collection. By writing Events, you can add validation, relationships, and security to your app. Events are written in JavaScript (specifically, the ECMAScript 5 standard) and have access to the [Collection Events API](/docs/collections/reference/event-api.md).

The following events are available for scripting:

Expand Down
8 changes: 4 additions & 4 deletions docs/collections/notifying-clients.md
Expand Up @@ -27,7 +27,7 @@ On the client, you would listen for that event using `dpd.on()` and respond by u

The `message` argument is the value you passed on the server (`this`).

See the [Chatroom Example](./examples/chatroom.md) for a working version of this code.
See the [Chatroom Example](/docs/collections/examples/chatroom.md) for a working version of this code.

### Browser and Server Support

Expand All @@ -46,7 +46,7 @@ The realtime features of Deployd are built on [Socket.IO](http://socket.io/) and

### Further Reading

- [Event API](./reference/event-api.md)
- [dpd.js Reference](./reference/dpd-js.md)
- [HTTP API Reference](./reference/http.md)
- [Event API](/docs/collections/notifying-clients.md)
- [dpd.js Reference](/docs/collections/reference/dpd-js.md)
- [HTTP API Reference](/docs/collections/reference/http.md)

2 changes: 1 addition & 1 deletion docs/developing-modules/custom-resource-types.md
Expand Up @@ -5,7 +5,7 @@

## Creating a Custom Resource Type

Deployd modules can register new *Resource Types*, which can be created with a route and configured per instance. Deployd comes with two built-in Resource Types: "Collection" and "User Collection". You can create your own custom resource types by extending the [Resource](./internal-api/resource.md) constructor and implementing a `handle()` method. Deployd will automatically load any Resource Types that are exported by a module.
Deployd modules can register new *Resource Types*, which can be created with a route and configured per instance. Deployd comes with two built-in Resource Types: "Collection" and "User Collection". You can create your own custom resource types by extending the [Resource](/docs/developing-modules/internal-api/resource.md) constructor and implementing a `handle()` method. Deployd will automatically load any Resource Types that are exported by a module.

Here is a simple custom resource type:

Expand Down
4 changes: 2 additions & 2 deletions docs/developing-modules/internal-api/collection.md
Expand Up @@ -5,7 +5,7 @@

## Collection Resource Type

Collections are the most common Resource Type in Deployd. They allow the user to store and load data from their app's [Store](./store.md). Behind the scenes, they validate incoming requests and execute event scripts for `get`, `post`, `put`, `delete`, and `validate`. If all event scripts execute without error (or `cancel()`ing), the request is proxied to the collection's `Store`.
Collections are the most common Resource Type in Deployd. They allow the user to store and load data from their app's [Store](/docs/developing-modules/internal-api/store.md). Behind the scenes, they validate incoming requests and execute event scripts for `get`, `post`, `put`, `delete`, and `validate`. If all event scripts execute without error (or `cancel()`ing), the request is proxied to the collection's `Store`.

### Class: Collection

Expand All @@ -27,7 +27,7 @@ Example inheriting from `Collection`:

* {Store}

The backing persistence abstraction layer. Supports saving and reading data from a database. See [Store](./store.md) for more info.
The backing persistence abstraction layer. Supports saving and reading data from a database. See [Store](/docs/developing-modules/internal-api/store.md) for more info.

### collection.validate(body, create) <!-- api -->

Expand Down
2 changes: 1 addition & 1 deletion docs/developing-modules/internal-api/context.md
Expand Up @@ -11,7 +11,7 @@ A `Context` is built from a request and response and passed to a matching `Resou

### Mock Contexts

Contexts may be created without a real request and response such as during an internal request using the `dpd` object. See [Internal Client](./internal-client.md) for more info.
Contexts may be created without a real request and response such as during an internal request using the `dpd` object. See [Internal Client](/docs/developing-modules/internal-api/internal-client.md) for more info.

### Class: Context

Expand Down
4 changes: 2 additions & 2 deletions docs/developing-modules/internal-api/server.md
Expand Up @@ -62,12 +62,12 @@ The **socket.io** sockets `Manager` object ([view source](https://github.com/Lea

### Server.sessions <!-- api -->

The server's [SessionStore](session-store.md).
The server's [SessionStore](/docs/developing-modules/internal-api/session-store.md).

### Server.router <!-- api -->

The server's `Router`.

### Server.resources <!-- api -->

An `Array` of the server's [Resource](./resource.md) instances. These a built from the config and type loaders.
An `Array` of the server's [Resource](/docs/developing-modules/internal-api/resource.md) instances. These are built from the config and type loaders.
4 changes: 2 additions & 2 deletions docs/getting-started/your-first-api.md
Expand Up @@ -5,7 +5,7 @@

## Your first Deployd API

If you haven't already, [install Deployd](installing-deployd.md).
If you haven't already, [install Deployd](/docs/getting-started/installing-deployd.md).

You can create a new project with the following commands.

Expand Down Expand Up @@ -43,5 +43,5 @@ You should see something like the following:

### More Tutorials and Examples

- [Your first App](your-first-app.md)
- [Your first App](/docs/getting-started/your-first-app.md)

2 changes: 1 addition & 1 deletion docs/getting-started/your-first-app.md
Expand Up @@ -115,7 +115,7 @@ In `index.html`, add the following script reference in between jQuery and `scrip

<script type="text/javascript" src="/dpd.js"></script>

This will add a reference to [dpd.js](../collections/accessing-collections.md), a simple library dynamically built specifically for your app's backend. Dpd.js will automatically detect what resources you have added to your app and add them to the `dpd` object. Each resource object has asynchronous functions to communicate with your Deployd app.
This will add a reference to [dpd.js](/docs/collections/accessing-collections.md), a simple library dynamically built specifically for your app's backend. Dpd.js will automatically detect what resources you have added to your app and add them to the `dpd` object. Each resource object has asynchronous functions to communicate with your Deployd app.

In `script.js`, add a `loadComments()` function inside of `$(document).ready`:

Expand Down
2 changes: 1 addition & 1 deletion docs/using-modules/official/email.md
Expand Up @@ -14,7 +14,7 @@ The Email resource is built on the [Nodemailer](https://github.com/andris9/Nodem

In your app's root directory, type `npm install dpd-email` into the command line. This should create a `dpd-email` directory in your app's `node_modules` directory.

See [Installing Modules](../installing-modules.md) for details.
See [Installing Modules](/docs/using-modules/installing-modules.md) for details.

### Configuration

Expand Down
4 changes: 2 additions & 2 deletions docs/using-modules/official/event.md
Expand Up @@ -12,7 +12,7 @@ This custom resource type allows you to write an event that will run when the re

In your app's root directory, type `npm install dpd-event` into the command line. This should create a `dpd-event` directory in your app's `node_modules` directory.

See [Installing Modules](../installing-modules.md) for details.
See [Installing Modules](/docs/using-modules/installing-modules.md) for details.

### Usage

Expand All @@ -36,7 +36,7 @@ And over HTTP:

### Event API

In addition to the generic [custom resource event API](../reference/event-api.md), the following functions and variables are available while scripting the Event resource:
In addition to the generic [custom resource event API](/docs/using-modules/reference/event-api.md), the following functions and variables are available while scripting the Event resource:


#### setResult(result) <!-- api -->
Expand Down
2 changes: 1 addition & 1 deletion docs/using-modules/official/s3.md
Expand Up @@ -12,7 +12,7 @@ This custom resource type allows you to store and retrieve files from an [Amazon

In your app's root directory, type `npm install dpd-s3` into the command line. This should create a `dpd-s3` directory in your app's `node_modules` directory.

See [Installing Modules](../installing-modules.md) for details.
See [Installing Modules](/docs/using-modules/installing-modules.md) for details.

### Configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/using-modules/reference/dpd-js.md
Expand Up @@ -119,4 +119,4 @@ Makes an RPC-style POST HTTP request at the URL `/<resource>/<func>/<path>`. Use

### Realtime API

The Generic Realtime API behaves the same way as the [Collection Realtime API](../../collections/reference/dpd-js.md#s-Realtime-API).
The Generic Realtime API behaves the same way as the [Collection Realtime API](/docs/collections/reference/dpd-js.md#s-Realtime-API).
2 changes: 1 addition & 1 deletion docs/using-modules/using-resource-types.md
Expand Up @@ -7,7 +7,7 @@

Deployd modules can register new *Resource Types*, which can be created with a route and configured per instance. Deployd comes with two built-in Resource Types: "Collection" and "User Collection".

To add more Resource Types, you can [install](./installing-modules.md) a module that includes one. The examples on this page use the [Event resource](./official/event.md).
To add more Resource Types, you can [install](/docs/using-modules/installing-modules.md) a module that includes one. The examples on this page use the [Event resource](/docs/using-modules/official/event.md).

#### Creating an instance of a Custom Resource Type

Expand Down
1 change: 0 additions & 1 deletion public/googleffd97db69d2cb364.html

This file was deleted.

2 changes: 0 additions & 2 deletions views/layouts/global.ejs
Expand Up @@ -2,9 +2,7 @@
<html lang="en" ng-app="docs">
<head>
<title>Deployd</title>
<link href='/css/prettify.css' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Bitter:400,700,400italic' rel='stylesheet' type='text/css'>
<link href="/stylesheets/bootstrap.css" rel='stylesheet' type='text/css'>
<link href="/stylesheets/style.css" rel='stylesheet' type='text/css'>
<%- script('libs/angular') %>
<%- script('libs/angular-sanitize') %>
Expand Down
10 changes: 5 additions & 5 deletions views/page.ejs
Expand Up @@ -25,15 +25,15 @@
default:
%>
<div id="index" class="row">
<div class="span7">
<h4>Table of Contents</h4>
<%- partial('toc', {info: app.index.root()}) %>
</div>
<div class="span5">
<div class="span5">
<div class="page">
<%- data.info.html() %>
</div>
</div>
<div class="span7">
<h4>Table of Contents</h4>
<%- partial('toc', {info: app.index.root()}) %>
</div>
</div>
<%
break;
Expand Down

0 comments on commit 9e616ca

Please sign in to comment.