New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

generator-sails-rest-api

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-sails-rest-api

Yeoman generator that provides already configured and optimized Sails REST API with bundle of predefined features.

  • 0.6.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-86.67%
Maintainers
1
Weekly downloads
 
Created
Source

generator-sails-rest-api

npm version Dependencies is up to date Build Status Gitter Documentation

Stability: 2 - Unstable

The project is in the process of settling, but has not yet had sufficient real-world testing to be considered stable.

Backwards-compatibility will be maintained if reasonable.

Yeoman generator that provides already configured and optimized Sails REST API with bundle of predefined features.

Features

  • Disabled hooks by default: cors, csrf, grunt, i18n, pubsub, session, views;
  • Implemented tools fix-deps and update-deps which fix package.json from unused and missing dependencies and updates dependencies in interactive mode;
  • Overrides default blueprints which simplify CRUD operation in REST API;
  • Integrated Passport with Facebook, Twitter and Local authorization strategies;
  • Already declared User model with most used fields;
  • Implemented 2 policies: isOurApp which checks if request is going from our applications, and isAuthenticated which inject user in req via JSON Web Token;
  • Custom responses which respond with code (Status Code), message (Status Message) and response (Response Data) fields;
  • Bundle of ready-2-use services like CipherService, PusherService (Push Notifications), SmsService and so on... You can check table with detailed list of implemented services below;
  • All configuration files cleaned up and optimized for REST API;
  • Integrated Swagger doc specification in doc folder;
  • Integrated Mocha tests for all blueprints, controllers, models, policies, responses and services. After generating you can execute npm test;

Getting Started

Start using generator is very simple.

First of all, you need install yeoman and generator-sails-rest-api:

npm install -g yo generator-sails-rest-api

Then create project directory and initiate the generator under the project directory:

mkdir my-project
cd my-project
yo sails-rest-api

You will be prompted for questions. Answer to those questions that generator is asks and you will get configured Sails project.

After scaffolding the project you can use this project as before. Just run the app.js file and all.

node app.js

Congratulations, you just have setup your first Sails REST API :+1:

How to use project code?

TODO: Fill with information. But you can read more at our wiki page

Bundled Sails services

Service NameImplemented providers
CipherServicebcrypt, JWT
MailerServiceMandrill
PaymentServiceStripe
PusherServiceApple Push Notifications, Google Cloud Messaging
SmsServiceTwilio
SocialServiceFacebook
StorageServiceAmazon S3, Google Cloud

How can I get latest dev version of generator?

Right now this generator is extremely under development, so each day our dev branch has new updates and fixes.

If you want get the latest updates, you should do this:

git clone https://github.com/ghaiklor/generator-sails-rest-api.git # Clone the repository
cd generator-sails-rest-api # Change directory
npm link # Link current directory to global module

After that our git repository will be linked to your global npm module and you can use it as described above.

If any updates will come you can just pull the last changes and call generator again:

cd generator-sails-rest-api
git pull
yo sails-rest-api

License

Copyright © 2015 Eugene Obrezkov

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Keywords

FAQs

Package last updated on 12 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc