sails.js

Deploy sails.js to Windows Azure Website

放肆的年华 提交于 2020-01-13 20:02:02
问题 I'm following this guide on installing a node.js application on Azure: http://www.windowsazure.com/en-us/develop/nodejs/tutorials/create-a-website-(mac)/#header-0 Is it possible to get a sails.js app running without having to instantiate a Virtual Machine? 回答1: As of right now sails requires an npm install -g on the box which would require either a virtual machine or a cloud service with a startup script. The link you are showing if for a deployment model where you don't get any access to

Deploy sails.js to Windows Azure Website

百般思念 提交于 2020-01-13 20:01:08
问题 I'm following this guide on installing a node.js application on Azure: http://www.windowsazure.com/en-us/develop/nodejs/tutorials/create-a-website-(mac)/#header-0 Is it possible to get a sails.js app running without having to instantiate a Virtual Machine? 回答1: As of right now sails requires an npm install -g on the box which would require either a virtual machine or a cloud service with a startup script. The link you are showing if for a deployment model where you don't get any access to

How do you catch all errors in SailsJS

跟風遠走 提交于 2020-01-13 06:00:01
问题 I'm new to Node and Sails and have been struggling with this problem for a couple of weeks now. I need to log (eventually to a file or database) all errors that occur in our Sails app. I have found a couple of answers that come close to solving this, but none seem to work 100%. I have setup things based off of the answer from this question When using Sails v0.9.16 I setup my logging in the config/500.js file, but when using test code... t.t; ... in my controller, Sails just prints out

Transactional SQL with Sails.js

China☆狼群 提交于 2020-01-12 03:21:11
问题 So I have been playing with NodeJS/Express for a little with now and I would really like to try to rewrite a relatively large side project using a full JavaScript stack just to see how it will work. Sails.js seems to be a pretty good choice for a NodeJS backend for a REST API with support for web sockets which is exactly what I am looking for however is one more issue I am looking to resolve and that is transactional SQL within NodeJS. Most data layer/orms I have seen on the NodeJS side of

Transactional SQL with Sails.js

本秂侑毒 提交于 2020-01-12 03:21:11
问题 So I have been playing with NodeJS/Express for a little with now and I would really like to try to rewrite a relatively large side project using a full JavaScript stack just to see how it will work. Sails.js seems to be a pretty good choice for a NodeJS backend for a REST API with support for web sockets which is exactly what I am looking for however is one more issue I am looking to resolve and that is transactional SQL within NodeJS. Most data layer/orms I have seen on the NodeJS side of

Sails Js permissions

倾然丶 夕夏残阳落幕 提交于 2020-01-11 13:22:15
问题 I got a sailsjs app on a debian server. My only user is root, I installed everything in root (npm install, npm install sails -g, npm install pm2 -g). When I try to deploy it with my root user (sails lift --prod), I got permissions errors : Grunt :: Running "clean:dev" (clean) task Grunt :: Cleaning .tmp/public... Grunt :: Warning: Cannot delete files outside the current working directory. ** Grunt :: An error occurred. ** error: ----------------------------------------------------------------

sails/waterline where association not exist

好久不见. 提交于 2020-01-07 03:04:14
问题 I'm using sails for my latest project, and would like to query a model for items that do not have an association. For example title collection... [ { id : 1, name : "ABC123", media : 1 }, { id : 2, name : "DEF456" } ] media collection... [ { id : 1, name : "1234.mpg", title : 1 }, { id : 2, name : "5678.mpg" } ] So, you can see that title 1 is associated (one to one) with media 1, and visa-versa, and that title 2, and media 2 are not associated with anything. My question is, using the

sails/waterline where association not exist

此生再无相见时 提交于 2020-01-07 03:04:00
问题 I'm using sails for my latest project, and would like to query a model for items that do not have an association. For example title collection... [ { id : 1, name : "ABC123", media : 1 }, { id : 2, name : "DEF456" } ] media collection... [ { id : 1, name : "1234.mpg", title : 1 }, { id : 2, name : "5678.mpg" } ] So, you can see that title 1 is associated (one to one) with media 1, and visa-versa, and that title 2, and media 2 are not associated with anything. My question is, using the

Sailsjs: Setting response method based on request parameter

不问归期 提交于 2020-01-07 02:25:10
问题 So I have been working on a SPA project using Sailsjs . The problem is: When the first page loads, I use res.view or res.render in my controller. But, for subsequent requests, I dont want to use res.view or res.render , rather I'd like to use res.json . Right now, I use the method: return req.param('json') ? res.json(myObj) : res.view('layout', myObj); This works, but I was looking for a more generic and abstract method in which my controller itself would know (on the basis of req.param('json

Migrating to Sails.js 0.12 - middleware migration

吃可爱长大的小学妹 提交于 2020-01-06 19:52:50
问题 I am migrating an old sails.js project which was written in 0.10.5 to 0.12.x. Since the original code was written a long time ago and may have some "non-conforming" code I decided to re-build the project by starting a new sails project and slowly migrating the models/controllers/services while keeping only necessary policies and configuration files. So far I managed to get the project to lift and now I am starting to deal with the authentication. Ideally, I intend to move to use passport with