Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "routesmith", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "A simple, lightweight routing solution for Express.", | ||
"main": "autorouter.js", | ||
"scripts": { | ||
"test": "" | ||
}, | ||
"keywords": [ | ||
@@ -18,7 +15,10 @@ "router", | ||
"repository": { | ||
"type":"git", | ||
"url":"https://gitlab.com/Kurnett/routesmith.git" | ||
"type": "git", | ||
"url": "https://github.com/Kurnett/routesmith" | ||
}, | ||
"author": "Kurnett", | ||
"license": "MIT" | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Kurnett/routesmith-sequelize/issues" | ||
} | ||
} |
@@ -1,5 +0,5 @@ | ||
#RouteSmith | ||
# RouteSmith | ||
RouteSmith is a simple routing solution for Express-based apps. It creates routes based off of a list of objects rather than a file structure, allowing you to quickly generate robust routes with easily-assigned controllers, middleware, and parameters. | ||
##Installation | ||
## Installation | ||
```bash | ||
@@ -9,3 +9,3 @@ $ npm install --save routesmith | ||
##Packages | ||
## Packages | ||
[RouteSmith-Sequelize](https://www.npmjs.com/package/routesmith-sequelize) allows developers to easily create controllers to go along with RouteSmith's routes. | ||
@@ -16,3 +16,3 @@ ```bash | ||
##Usage | ||
## Usage | ||
```bash | ||
@@ -26,19 +26,19 @@ const express = require('express'); | ||
``` | ||
###Route Data | ||
### Route Data | ||
RouteSmith requires an array of JSON objects containing specific information to be defined in order to generate routes. | ||
####Path | ||
#### Path | ||
The `path` field determines the URL of the endpoints to be generated. | ||
####ID | ||
#### ID | ||
The `id` field determines the name to be used for the URL parameter (e.g. `/users/:userID`). | ||
####Controllers | ||
#### Controllers | ||
Controllers are expected to be objects with `create`, `get`, `getAll`, `update`, and `remove` methods, corresponding to basic CRUD operations. | ||
####Middleware | ||
#### Middleware | ||
Middleware methods can be inserted via the `middleware` array. Middleware is applied to children of each routes - that is, if you have middleware to check for editing permission on one route, that middleware will also check for permissions on all requests to children of that route. | ||
####Children | ||
#### Children | ||
The `children` array contains a list of other routes to be created under the original route. | ||
@@ -48,3 +48,3 @@ | ||
###Example Routes | ||
### Example Routes | ||
```bash | ||
@@ -95,2 +95,2 @@ const routes = [ | ||
/users/:userID/posts/:postID | ||
``` | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
5122
1
92