Pour moi le plus simple à gérer ce serait on a une hive
/hives/{id}
qui nous a renvoyer
{
"_links": {
"favorite": "/hives/2/favorites/{userId}"
}
| Version 1 : | |
| function readContent(callback) { | |
| fs.readFile("./tmp/tmp.log", function (err, content) { | |
| if (err) return callback(err); | |
| callback(null, content); | |
| }) | |
| } | |
| var fileContent = readContent(function (err, content) { | |
| console.log(content); |
| function readContent(callback) { | |
| fs.readFile("./tmp/tmp.log", function (err, content) { | |
| if (err) return callback(err); | |
| callback(null, content); | |
| }) | |
| } | |
| exports.index = function(req, res){ | |
| readContent(function(err, fileContent){ | |
| res.render('index', { |
Pour moi le plus simple à gérer ce serait on a une hive
/hives/{id}
qui nous a renvoyer
{
"_links": {
"favorite": "/hives/2/favorites/{userId}"
}
| The question is, how do we create linked resources with the main one, e.g. if for some business reasons a user is created with an avatar and the avatar is a different resource because it can be associated with other stuff than a user... | |
| What should be the format of the POST request on /users doing this ? |
| Running "requirejs:dist" (requirejs) task | |
| >> Error: Error: The "out" and "dir" options are incompatible. Use "out" if you are targeting a single file for for optimization, and "dir" if you want the appDir or baseUrl directories optimized. | |
| >> at Function.build.createConfig (xxx/node_modules/grunt-requirejs/node_modules/requirejs/bin/r.js:23730:19) | |
| Warning: Task "requirejs:dist" failed. Use --force to continue. |
| [].forEach.call( | |
| document.querySelectorAll('a.lien_interne'), function(el){ | |
| el.outerHTML = el.innerText; | |
| } | |
| ); |