Skip to content

Conversation

typerandom
Copy link
Contributor

Adds validation so that we ensure that web.spa.enabled isn't set without a web.spa.view.

Discussion

What do you think about the error message? Is it descriptive enough?

How to verify

  1. Checkout this branch.
  2. Run $ npm link.
  3. Checkout and link the stormpath and express-stormpath stormpath modules with stormpath-config.
  4. Clone express-stormpath-sample-project.
  5. Use npm link and npm link express-stormpath to link the library to the example project.
  6. Open up app.js and set web.spa.enabled to true.
  7. Start the server.
  8. Verify that the SPA mode is enabled but web.spa.view isn't set. This needs to be the absolute path to the page that you want to serve. console error error is shown.
  9. Open up app.js and set web.spa.view to abc.
  10. Start the server.
  11. Verify that that no console error is being shown.
  12. Open up app.js and set web.spa.enabled to false and web.spa.view to null.
  13. Start the server.
  14. Verify that that no console error is being shown.

Fixes #36.

@robertjd
Copy link
Member

Verified, merging and will make a patch release so that we can use this immediately.

robertjd added a commit that referenced this pull request Feb 19, 2016
Add validation to ensure that web.spa.enabled isn't set without a web.spa.view
@robertjd robertjd merged commit 98432d2 into master Feb 19, 2016
@robertjd robertjd deleted the feature-add-web-spa-validation branch February 19, 2016 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants