Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

echo-crud

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

echo-crud

Restful with mongo and koa

  • 0.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

ECHO-CRUD

Restful with mongodb + koa :heart:

Pdta: ECHO (Elian Chancay Olivo is my Son :baby: It's funny because I do not like php )

Developing ... :runner:

version downloads slack


NPM


How to use


  import koa          from 'koa';
  import mongoose     from 'mongoose';
  import echoApi      from 'echo-crud';

  const app = koa();
  const mongoUrl = 'mongodb://localhost/yourDatabase';

  mongoose.connect(mongoUrl);

  let schema = new mongoose.Schema({
    name: String,
    age : Number
  }, {versionKey: false});

  const model = app.model = mongoose.model('user', schema);
  const user = echoApi(app, model,['GET','POST','PUT','DELETE']);

  app.use(user.routes());

  app.listen(3000);

Use header X-Requested-With : XMLHttpRequest

test in your browser. http://localhost:3000/users

--Paramsquerybody
GETlimit - skip - sort---
GETidlimit - skip - sort---
POST------Json data
DELETEid*------
PUTid*---Json data

Bitdeli Badge

Keywords

FAQs

Package last updated on 23 Dec 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc