sails.js

unable to install npm bcrypt on ubuntu

旧街凉风 提交于 2020-08-22 17:51:39
问题 I am trying to install bcrypt to use it with sails js and passport on an ubuntu system but unable to install it. On running he command to install bcrypt following log is generated on the terminal: manav@tantraadmin:~$ npm install bcrypt \ > bcrypt@0.8.0 install /home/manav/node_modules/bcrypt > node-gyp rebuild make: Entering directory `/home/manav/node_modules/bcrypt/build' CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o make: g++: Command not found make: *** [Release/obj.target

How to connect two docker containers through localhost?

偶尔善良 提交于 2020-07-18 09:34:27
问题 I have two services running in separate containers, one is grunt(application) and runs off port 9000 and the other is sails.js (server) which runs off port 1337. What I want to try to do is have the client app connect with the server through localhost:1337. Is this feasible? Thanks. 回答1: HOST You won't be able to connect to the other container with localhost (as localhost is the current container) but you can connect via the container host (the host that is running your container). In your

Is there a way to override sails.js waterline endpoint with custom controller, but keep built in pagination, and filtering?

泪湿孤枕 提交于 2020-07-10 06:53:11
问题 I have defined a model, and I like that I get pagination, and filtering out of the box with waterline and blueprint. However, I need to add a where clause to all requests. I don't wasn't the client to add the where. I still want to get all the magical sails.js pagination and filters though that I lose when I create an override controller. Does anyone know how to get my cake and eat it too? 回答1: I initially went the route that arbuthnott suggested, however I was frustrated that it only worked

Mocha runs only one test

倾然丶 夕夏残阳落幕 提交于 2020-06-18 04:04:41
问题 I have a sails.js app that I want to test with mocha, in my test folder I have 2 tests, but when I run mocha only one test gets executed. Test1.js var request = require('supertest'); describe.only('UserController', function() { describe('#login()', function() { it('should redirect to /mypage', function (done) { done(); }); }); }); Test2.js describe.only('UsersModel', function() { describe('#find()', function() { it('should check find function', function (done) { done(); }); }); }); I run