Comments (5)
ok, so aside from rest, i want to explicitly insert and i found out by guessing that there is a method called "create" papering over mongos "insert"
again, i'm a noob and probably being dumb: but why are we changing mongo verbs to fit a concept called crud?
i know the general basics of rest, but I don't understand how our http req/res and url correspond implicitly to crud... IMO these are unstated assumptions that should be made explicit.
in my case, i am uploading an image file via the multer package, and i want the metadata (path filename etc) to be inserted into a mongo collection at the same time as the upload (versus chunked upload directly into mongo...) so I simply added the line:
mongodb({db:'feathers', collection:'masterCards'}).create(req.file);
and it's working...
but this would be good to speak about, IMO
from feathers-mongodb.
feathers-mongodb
is a database adapter for Feathers, which holds maintaining fully RESTful APIs as one of its primary principles. There are a couple of people currently updating this adapter to bring it up to par with the other adapters. In the meantime, I would recommend using the feathers-mongoose
adapter and turning off Mongoose schemas (which is as simple as providing an empty object as your schema, I believe.) until feathers-mongodb
is updated to the new API. Turning off Mongoose schemas should make it work pretty similar to this adapter.
Also, check out the Feathers docs here: http://docs.feathersjs.com.
You can find the service methods here: http://docs.feathersjs.com/services/readme.html#service-methods
from feathers-mongodb.
We are working on the v2 docs at http://docs.feathersjs.com/ but how those methods correspond to REST and websocket calls should also be documented fairly detailed in the current documentation at http://feathersjs.com/docs/#toc10 and in the quick start guide.
from feathers-mongodb.
thanks for the info, folks
from feathers-mongodb.
http://feathersjs.com might be a better introduction to see how it works and compares to Meteor, Sails, etc.
from feathers-mongodb.
Related Issues (20)
- RegExp in $in inside query does not get passed to server properly. HOT 2
- An in-range update of @feathersjs/adapter-commons is breaking the build 🚨 HOT 1
- An in-range update of dtslint is breaking the build 🚨 HOT 1
- An in-range update of @types/mongodb is breaking the build 🚨 HOT 3
- Aggregation pipeline for patch HOT 2
- $near query with pagination HOT 1
- Support for bulkWrite HOT 8
- Await setting the model before continuing HOT 3
- $geoNear, $near, and $nearSphere are not allowed in this context
- Regex not working HOT 1
- _objectifyId does not objectify id's nested in query objects
- Multi-tenancy support? HOT 1
- Error when upgrade package mongodb to 4.0.1 HOT 3
- Why this query is not using the index? ( keysExamined: 0 docsExamined: 27417057 ) HOT 3
- Compatibility with mongo driver V4
- ECONNREFUSED when db container is moved/recreated to a new node
- upsert does not create new record HOT 1
- $push not working as expected HOT 1
- Multi create/patch/remove performance HOT 1
- Not working find query with complex query on the _id field (ObjectId conversion) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feathers-mongodb.