Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

periodicjs.core.controller

Package Overview
Dependencies
Maintainers
2
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

periodicjs.core.controller

Customizable CMS platform

  • 5.9.76
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
decreased by-40%
Maintainers
2
Weekly downloads
 
Created
Source

periodicjs.core.controller

Periodic's Core Controller module, provides helpful controller methods for querying documents and rendering responses.

Extensions are node modules that are loaded when an instance of periodic is instantiated.

API Documentation

Installation

$ npm install periodicjs.core.controller

This is a part of Periodic's core.

Usage

Querying for tag

JavaScript

var Controller = require('periodicjs.core.controller'),
	CoreController = new ControllerHelper(resources),
	Tag = mongoose.model('Tag');
req.controllerData = (req.controllerData) ? req.controllerData : {};

CoreController.loadModel({
		docid: 'news',
		model: Tag,
		population: 'contenttypes parent',
		callback: function (err, doc) {
			if (err) {
				CoreController.handleDocumentQueryErrorResponse({
					err: err,
					res: res,
					req: req
				});
			}
			else {
				req.controllerData.tag = doc;
				next();
			}
		}
	});

##Development Make sure you have grunt installed

$ npm install -g grunt-cli

Then run grunt watch

$ grunt watch

For generating documentation

$ grunt doc
$ jsdoc2md index.js > doc/api.md

##Notes

Keywords

FAQs

Package last updated on 02 Aug 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