npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sails-hook-adminx

v0.1.3

Published

AdminX hook for Sails.js. AdminX is a sleek admin panel that integrates with any database, without coding.

Downloads

15

Readme

sails-hook-adminx

Build Status dependencies Status npm version Join the chat at https://gitter.im/adminxhq/sails-hook-adminx Twitter Follow

Sails hook for AdminX. Manage your sails app data without coding.

What's AdminX?

AdminX is a universal, fast and reliable admin panel.

Try it with the Live Demo

Sample app

We open sourced the demo app we use on the website: Sails Demo Code

Requirements

  • Sails >0.12 or >1.0
  • Waterline: this integrations requires you to use the default Sails ORM

What does sails-hook-adminx do under the bonnet?

  1. Initializes on sails lift as the sails-hook-adminx
  2. Exposes a REST API under /adminx/*
  3. Adds CORS (Cross Origin Resource Sharing) configuration to open access from AdminX-served-pages on your browser to your servers (https://adminx.io)

An AdminX Panel is then able to connect from your browser to your server securely.

Install

# npm install sails-hook-adminx --save
yarn add sails-hook-adminx@^0.1.2 # Sails 1.0
# or
yarn add sails-hook-adminx@^0.0.10 # Sails 0.12

Configure

Create a config/adminx.js file

/**
 * AdminX Configuration
 * (sails.config.adminx)
 *
 * Configure settings for AdminX
 *
 */
module.exports.adminx = {
  
  // Ignores the authentication, for development purposes only
  authEnabled: true,
  
  //Go to AdminX site and configure a new Data Auth Token
  dataAuthToken: 'REPLACE_THIS_TOKEN'
};

Usage

In your models, you can now define an adminx attribute with the adminx configurations you need.

/**
 * Car.js
 *
 * @description :: Motorized vehicle with 4 wheels for individual and family transport
 * @docs        :: http://sailsjs.org/#!documentation/models
 */

module.exports = {

  /* SailsJS schema configuration
   * Mandatory for SailsJS framework */
  attributes: {
    model: { type:'string' },
    brand: { model: 'brand' },
    year: { type: 'integer', min: 2000, max: 2019 },
    dailyRate: { type: 'float', min: 0 },
    availableAt: { type: 'date' },
    fullTank: { type: 'boolean' },
    summary: { type: 'mediumtext' },
    thumbnail: { type: 'string' },
    cover: { type: 'string' },
    extras: { type: 'array' },
    doorConfiguration: {
      type: 'string',
      enum: ['2 Doors', '3 Doors', '4 Doors', '5 Doors', '6 Doors']
    },
    history: { type: 'longtext' },
    metaData: { type: 'json' },
  },

  /* AdminX configuration
   * This configuration is optional
   * Here you can define how AdminX
   * displays and helps you edit your data */
  adminx: {
    name: 'Car',
    attributes: {
      id: { disabled: true },
      thumbnail: { list: true, editor: 'image' },
      brand: { }, // Here for ordering
      model: { list: true },
      summary: { }, // Here for ordering
      cover: { editor: 'image' },
      history: { editor: 'html-simple' },
      updatedAt: { list: true },
    }
  }
};

AdminX Panel

Resources

License

MIT License Copyright © 2016-2017 Albert Peiro, ADMINX LTD.

image_squidhome@2x.png