You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, @decent/cli has to directly edit the database of the running server when commands are run. It'd be nice to allow require('@decent/server') consumers to pass some kind of object in with config and for it to export a nice programmatic API for them.
Thoughts?
The text was updated successfully, but these errors were encountered:
This would be nice, but probably hard to implement. We currently seriously rely on Express's middleware system, both for behavioral logic and dealing with errors/bad input. I'm not sure how to fake Express middleware accurately or how to fit this into our existing code nicely. I have an "evaluate middleware" function I made for the server tests, but it's certainly not an exact clone of how Express works; it's just there so we can test each middleware function as its own unit.
@towerofnix it would be fun to abstract the API more - eg. user.create function which is used by POST /api/users would be used both in the express code and also exported by @decent/server.
Currently,
@decent/cli
has to directly edit the database of the running server when commands are run. It'd be nice to allowrequire('@decent/server')
consumers to pass some kind of object in with config and for it to export a nice programmatic API for them.Thoughts?
The text was updated successfully, but these errors were encountered: