Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
fist-fistlabs_unit_controller
Advanced tools
Fist plugin providing abstract controller
##Basic usage:
// app.js
var app = fist({
unitSettings: {
_fistlabs_unit_controller: {
viewsDir: '/views',
engines: {
'.jade': require('consolidate').jade
}
}
}
});
app.install('fist-fistlabs_unit_controller');
// fist_plugins/units/controllers/news.js
app.unit({
base: '_fistlabs_unit_controller',
name: 'news',
rule: 'GET /news/',
defaultName: 'index.jade',
deps: ['user_info', 'news_list']
});
##Settings
You can configure base controller unit with params.unitSettings
###String viewsDir=app.params.root+'views'
The directory name view names will be resolved from
###Object engines={}
The dictionary which provides extname->engine relation
Supports extensions as bemhtml.js
, in fact it is the substring from end of view file name.
The value may be both string and function (consolidate.js)
##API:
_fistlabs_unit_controller
unit a also provides some api to make your controllers smarter.
###String unit.defaultViewName
Default view name
###String unit.lookupViewName(track, context)
Should return template name, returns unit.defaultViewName
by default.
###String unit.rule
Router rule to automatic assign the unit with request pattern
LICENSE MIT
FAQs
Base controller as a unit
The npm package fist-fistlabs_unit_controller receives a total of 4 weekly downloads. As such, fist-fistlabs_unit_controller popularity was classified as not popular.
We found that fist-fistlabs_unit_controller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.