mongo-crest

1.1.0 • Public • Published

Installation

npm i -g mongo-crest

Usage

npm start

About

A deplyable and customizable REST-API server. The core API functions can be found in src/ while the schema is in src/schema. The validator function in src/validate.coffee will be ran for every request. This function will run the request data against the schema.

Schemas

The schemas are simply hash tables of regular expressions. Each field that is being requested will be tested against the regex.

contact =
    firstName: /[a-z]{2,32}/i
    lastName: /[a-z]{2,32}/i
    email: /[a-z0-9\_\-\.]{2,32}@[a-z0-9\_\-\.]{2,32}/i
    website: /[a-z0-9\_\-\.]{5,64}/i

Readme

Keywords

Package Sidebar

Install

npm i mongo-crest

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • dannynpmjs