Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. module.exports = {
  2. attributes: {
  3. name : {
  4. type: 'string'
  5. },
  6. pass : {
  7. type: 'string'
  8. }
  9. }
  10. };
  11.  
  12. module.exports = {
  13.  
  14. users: function (req, res) {
  15. User.find().exec(function(err, listusers) {
  16. sails.log(listusers);
  17. if (err) {sails.log("no result"); }
  18. return res.view('test', {
  19. user: listusers
  20. });
  21. });
  22. }
  23. };
  24.  
  25. someMysqlServer: {
  26. adapter: 'sails-mysql',
  27. host: 'localhost',
  28. user: 'test', //optional
  29. password: 'test', //optional
  30. database: 'test' //optional
  31. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement