Skip to content

Commit

Permalink
Use appropriate handler
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg authored May 29, 2017
1 parent ea4b240 commit 0220542
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions documentation/suggested-project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jsonApi.start();
The idea is to stick to having one resource per file and stick to pure config. Each file should do nothing more than define a resource. Handlers should be referenced from the `../handlers` folder, which enables us to easily abstract functionality by sharing features amongst handlers. Resource files are effectively defining your routing layer.

```javascript
var commentHandler = require("../handlers/commentHandler.js");
var photosHandler = require("../handlers/photosHandler.js");

jsonApi.define({
resource: "photos",
handlers: memoryHandler,
handlers: photosHandler,
attributes: {
title: jsonApi.Joi.string()
url: jsonApi.Joi.string().uri()
Expand Down

0 comments on commit 0220542

Please sign in to comment.