Sails: Sails 1.0 Web app blueprint api not working

Created on 22 Jan 2019  路  3Comments  路  Source: balderdashy/sails

Sails version: 1.1.0
Node version: 8.11.3
NPM version: 6.1.0
DB adapter name: N/A
DB adapter version: N/A
Operating system: Ubuntu 18.04 64bit



Hi, I am facing blueprint api issue.
when I create Empty sails app and generate api using CLI

sails generate api Product

then get rest api like localhost:1337/product

But create sails app with Web App option and generate api using CLI, like:

sails generate api Product

I did not get any rest api

NB: I try change config/blueprint.js but did not work. Thank you

blueprints does this answer your question?

Most helpful comment

@mahfuzur I was able to reproduce this case myself, however after changing rest: false to rest: true then re-lifting sails and logging in to the example WebApp with login: [email protected] / pass: abc123 - the route to my api worked in the new WebApp. Have you tried this yet?

All 3 comments

Hi @mahfuzur! It looks like you missed a step or two when you created your issue. Please edit your comment (use the pencil icon at the top-right corner of the comment box) and fix the following:

  • Verify "I am experiencing a concrete technical issue (aka a bug) with Sails (ideas and feature proposals should follow the guide for proposing features and enhancements (http://bit.ly/sails-feature-guide), which involves making a pull request). If you're not 100% certain whether it's a bug or not, that's okay--you may continue. The worst that can happen is that the issue will be closed and we'll point you in the right direction."
  • Verify "I am not asking a question about how to use Sails or about whether or not Sails has a certain feature (please refer to the documentation(http://sailsjs.com), or post on http://stackoverflow.com, our Google Group (http://bit.ly/sails-google-group) or our live chat (https://gitter.im/balderdashy/sails)."
  • Verify "I have already searched for related issues, and found none open (if you found a related _closed_ issue, please link to it in your post)."
  • Verify "My issue title is concise, on-topic and polite ("jst.js being removed from layout.ejs on lift" is good; "templates dont work" or "why is sails dumb" are not so good)."
  • Verify "I have tried all the following (if relevant) and my issue remains:"
  • Verify "I can provide steps to reproduce this issue that others can follow."

As soon as those items are rectified, post a new comment (e.g. “Ok, fixed!”) below and we'll take a look. Thanks!

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]

@mahfuzur I was able to reproduce this case myself, however after changing rest: false to rest: true then re-lifting sails and logging in to the example WebApp with login: [email protected] / pass: abc123 - the route to my api worked in the new WebApp. Have you tried this yet?

@johnabrams7 Thank you, now it works. After login blueprints API works.

Was this page helpful?
0 / 5 - 0 ratings