简体   繁体   中英

express-resource mapping elements relationship

How can I create a server to manage my entity relationships using node.js and express-resources

I meam, if I have a User entity, I can access it using /user/<user-id> . But how can I define some properties, using this site as example, /user/<user-id>/question/<question-id> ?

var users = app.resource("users", require("./resources/users"),
    questions = app.resource("questions", require("./resources/questions");

users.add(questions);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM