Giter Site home page Giter Site logo

sails-starter-app's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sails-starter-app's Issues

User creation fails

Creating a user according to the tutorial does not work unless one removes the _csrf value. This is the traceback:

TypeError: Cannot read property '1' of null
at Object.isSameOrigin (/home/kokujin/sails/starterapp/node_modules/sails/lib/util/index.js:256:70)
at routes.before./* (/home/kokujin/sails/starterapp/node_modules/sails/lib/hooks/csrf/index.js:23:60)
at _bind.enhancedFn (/home/kokujin/sails/starterapp/node_modules/sails/lib/router/bind.js:375:4)
at callbacks (/home/kokujin/sails/starterapp/node_modules/sails/node_modules/express/lib/router/index.js:164:37)
at param (/home/kokujin/sails/starterapp/node_modules/sails/node_modules/express/lib/router/index.js:138:11)
at pass (/home/kokujin/sails/starterapp/node_modules/sails/node_modules/express/lib/router/index.js:145:5)
at nextRoute (/home/kokujin/sails/starterapp/node_modules/sails/node_modules/express/lib/router/index.js:100:7)
at callbacks (/home/kokujin/sails/starterapp/node_modules/sails/node_modules/express/lib/router/index.js:167:11)
at _addResViewMethod (/home/kokujin/sails/starterapp/node_modules/sails/lib/hooks/views/index.js:337:3)
at _bind.enhancedFn (/home/kokujin/sails/starterapp/node_modules/sails/lib/router/bind.js:375:4)

License?

Am I allowed to use this base for a commercial application?

TypeError: Cannot read property 'mail' of undefined

Hi thank you for creating this.
I am getting the following error on "sails lift". What am I missing?

/Users/ramirez/apps/projects/node/sails-starter-app/api/models/Email.js:20
name: sails.config.mail.from.name,
^
TypeError: Cannot read property 'mail' of undefined

How to expose kue UI

Hi, do you think is possible to show the KUE UI inside a sails app?
Maybe as a mounted app?

Can't sails lift -- smtp undefined in Mailer.js

/Users/alenail/Documents/bluemoon/sails-starter-app/api/services/Mailer.js:12
host: sails.config.smtp.host,
^
TypeError: Cannot read property 'host' of undefined

What do you make of this? I cloned, npm installed, started mongo, and tried to sails lift.

Cannot run User unit tests

Hello,

thanks a lot for this starter app. In order to understand correctly what you did, I created a blank sails app and copied your User model and user unit test and configured the test with grunt-mocha-test.
When running the test, it seems that beforeCreate is not called (so no encrypedPassword is done). Any idea what can cause this ?

User Model:

Password encryption
  for a new user
    1) must encrypt the password
  for an existing user
    if the password was changed
      2) must encrypt the new password
    if the password was not changed
      3) must not try to encrypt the password
Password validation
  given a valid password
    4) must return true
  given an invalid password
    5) must return false
Session tokens
  #issueSessionToken()
    6) must persist a session token in database
  #consumeSessionToken()
    7) must return the user object and discard the token
API Key
  8) must be generateted for a new user
.fullName()
  given first name only
    ✓ must return first name only, no trailing space 
  given last name only
    ✓ must return last name only, no preceeding space 
  given both first and last name
    ✓ must return the full name 
  given neither first or last name
    ✓ must return empty string 
.generatePasswordResetToken()
  9) "before all" hook

4 passing (887ms)
9 failing

Also, In the User model, you redefined the toJSON method:

   toJSON: function() {
     var user = this.toObject();
     delete user.password;
     delete user.passwordConfirmation;
     delete user.encryptedPassword;
     delete user.sessionTokens;
     delete user._csrf;
      return user;
   },

But there are no password nor passwordConfirmation within the User model.

Any ideas why the unit test does not pass ?

API-key based authentication

Hi, awesome work on putting together a starter app for sails that includes authentication! Its definitely something thats lacking and for someone who's new to a full stack JS dev environment its extremely helpful. Was wondering about whether or not you're still planning on adding API-key based authentication? I'm extremely interested in how that might be implemented as I'm currently working on an Angular-Sails based app through which the client side interacts exclusively with the server using API REST calls. There aren't a lot of good resources online for implementing this kind of thing so I'm eagerly awaiting any light you might be able to shed on the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.