vulpejs
VulpeJS is a Open-Source Full-Stack solution to Node.js applications
Last updated 4 years ago by lordfelipe .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vulpejs 
SYNC missed versions from official npm registry.

VulpeJS

VulpeJS

Open-Source Full-Stack solution to Node.js applications with Express.js, Pug, AngularJS and MongoDB.

Works on Linux (stable) & MacOSx (stable) & Windows (stable).

NPM version Gitter Build Status Inline docs Dependency Status

NPM

Examples

VulpeJS Heroku Apptest Example.

Install

Add VulpeJS dependency in your package.json

...
"vulpejs": "~0.1.39",
...

And run install:

npm install

Enjoy!

Examples

Creating a Simple CRUD

Add Model models/city.js

  "use strict";

  /**
   * Create City Model
   * @return {Object} Model
   */
  module.exports = vulpejs.models.make({
    name: 'City',
    schema: {
      name: {
        type: String,
        required: true,
      },
      acronym: {
        type: String,
        required: true,
      },
      status: {
        type: String,
        required: true,
        'default': 'ACTIVE',
        enum: ['ACTIVE', 'INACTIVE'],
      },
      modified: {
        type: Date,
        'default': Date.now,
      },
      user: {
        type: vulpejs.mongoose.Schema.Types.ObjectId,
        ref: 'User',
      },
    },
  });

Add Route routes/city.js

"use strict";

/**
 * Create City Routes
 * @return {Object} Express Router
 */
module.exports = vulpejs.routes.make({
  name: 'city',
  save: {
    data: ['name', 'acronym'],
  },
  ui: {
    controller: {
      name: 'City',
      service: {
        predicate: 'name',
        focus: 'name',
        messages: {
          validate: {
            exists: 'City already exists.',
          },
        },
        model: {
          name: '',
          acronym: '',
          status: 'ACTIVE',
        },
      },
    },
    main: {
      title: 'City',
      inputs: [{
        type: 'text',
        name: 'name',
        label: 'Name',
        capitalize: 'first',
        required: true,
      }, {
        type: 'text',
        name: 'acronym',
        label: 'Acronym',
        case: 'upper',
        required: true,
      }, ],
    },
    select: {
      title: 'City List',
      filter: {
        search: {
          colspan: 2,
        },
        status: {
          colspan: 2,
          items: [{
            value: 'ACTIVE',
            label: 'Active',
          }, {
            value: 'INACTIVE',
            label: 'Inactive',
          }, ],
        },
      },
      items: [{
        name: 'name',
        label: 'Name',
        style: {
          width: '55%',
        },
      }, {
        name: 'acronym',
        label: 'Acronym',
        style: {
          width: '10%',
        },
      }, {
        name: 'status',
        style: {
          width: '10%',
        },
        css: {
          'class': 'text-center',
        },
        switch: [{
          when: 'ACTIVE',
          image: 'status-online.png',
          title: 'Active',
        }, {
          when: 'INACTIVE',
          image: 'status-offline.png',
          title: 'Inactive',
        }, ],
        label: 'Status',
      }, {
        label: 'Actions',
        style: {
          width: '10%',
        },
      }, ],
      actions: [],
    },
  },
});

Run it:

$ npm start

And access:

http://localhost:3000/city

Current Tags

  • 0.1.39                                ...           latest (4 years ago)

64 Versions

  • 0.1.39                                ...           4 years ago
  • 0.1.38                                ...           4 years ago
  • 0.1.37                                ...           4 years ago
  • 0.1.36                                ...           4 years ago
  • 0.1.35                                ...           5 years ago
  • 0.1.34                                ...           5 years ago
  • 0.1.33                                ...           5 years ago
  • 0.1.32                                ...           5 years ago
  • 0.1.31                                ...           5 years ago
  • 0.1.30                                ...           5 years ago
  • 0.1.29                                ...           5 years ago
  • 0.1.28                                ...           5 years ago
  • 0.1.27                                ...           5 years ago
  • 0.1.26                                ...           5 years ago
  • 0.1.25                                ...           5 years ago
  • 0.1.24                                ...           5 years ago
  • 0.1.23                                ...           5 years ago
  • 0.1.22                                ...           5 years ago
  • 0.1.21                                ...           5 years ago
  • 0.1.20                                ...           5 years ago
  • 0.1.19                                ...           5 years ago
  • 0.1.18                                ...           5 years ago
  • 0.1.17                                ...           5 years ago
  • 0.1.16                                ...           5 years ago
  • 0.1.15                                ...           5 years ago
  • 0.1.14                                ...           5 years ago
  • 0.1.13                                ...           5 years ago
  • 0.1.12                                ...           5 years ago
  • 0.1.11                                ...           5 years ago
  • 0.1.10                                ...           5 years ago
  • 0.1.9                                ...           5 years ago
  • 0.1.8                                ...           5 years ago
  • 0.1.7                                ...           5 years ago
  • 0.1.6                                ...           5 years ago
  • 0.1.5                                ...           5 years ago
  • 0.1.4                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
  • 0.0.24                                ...           5 years ago
  • 0.0.23                                ...           5 years ago
  • 0.0.22                                ...           5 years ago
  • 0.0.21                                ...           5 years ago
  • 0.0.20                                ...           5 years ago
  • 0.0.19                                ...           5 years ago
  • 0.0.18                                ...           5 years ago
  • 0.0.17                                ...           5 years ago
  • 0.0.16                                ...           5 years ago
  • 0.0.15                                ...           5 years ago
  • 0.0.14                                ...           5 years ago
  • 0.0.13                                ...           5 years ago
  • 0.0.12                                ...           5 years ago
  • 0.0.11                                ...           5 years ago
  • 0.0.10                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (46)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |