basilinc / madmen Goto Github PK
View Code? Open in Web Editor NEWA Mongoose/Express admin section to manage mongoose resources
A Mongoose/Express admin section to manage mongoose resources
The following controller actions should be written
The controller actions are generic so we only need to write a single set regardless of how many resources Madmen is managing. To achieve this we bind the model name as the first parameter to the controller actions like so:
app.get('/index', controller.index.bind(null,'User'));
We can then use that model name to dynamically grab the mongoose model to perform the correct actions:
var index = function(modelName, req, res) {
var resource = mongoose.model(modelName);
// Other stuff here
}
In order to make this as generic as possible we will be using JSON to create new/update existing documents. All we need in the form for now is a textarea.
Once you get the basic controller actions working I will help you setup the actual create/update functionality.
You can use OctoAvenger as an example for the inner workings of the controller actions but use the controller.index
currently in madmen as a reference for defining the parameters and how to get the mongoose model.
The views should just be super super basic for now, similar to index.jade
. We will extend the views and make it look awesome as soon as we get the basic functionality in and can use it to manage resources.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.