
Security News
NIST Officially Stops Enriching Most CVEs as Vulnerability Volume Skyrockets
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.
being tested
Als-mvc is a build with extended abilities. The build use mongoDb for model, Express and dynamic route system for controllers and layout management system and front packages for views.
Included:
addCsrf() without csrf parameter, to add csrf to forms without csrfPlease follow those steps:
npm i als-mvcnode node_modules\als-mvc\buildnode cli create Usernode cli settings (not required in dev mode)"dev":"nodemon server.js"npm run devBuild tree:
The route system powered by als-dynamic-router. You can read more by folowing the link.
Short explanation - each route is a file inside routes folder, where before extension filename has a method like some.get.js.
For example \posts\some.get.js is /posts/some route.
Also, you can use params with $, where for example \posts\$post.get.js is /posts/:post.
Also you can use middleware for group of routes with mw.js for all files and subfolders or #mw.js only for files in it's directory.
The als-dynamic-router has many other abilities like dynamic middleware, routers, dynamic static folders and more.
There are auth routes inside routes folder.
When you have run node cli create User you have added admin user.
Each user has it's role (you can see the roles in models\User and in settings)
When you have run node cli settings you added to sqlite database all settings from the file.
Now those settings available as process.settings.
You can update the settings with process.settings.set(key,value) or refresh the settings with process.settings.get().
All static route available on process.settings.statics as object.
The initial statics available inside app/settings.js.
Also you can change the object, by updating existing.
Here example:
let statics = process.settings.statics
statics['/accessibility'] = 'node_modules/accessibility/dist'
process.settings.set('statics',statics)
On each route, you have req.scripts = {} and req.links = {}.
Each of them has to include objects for als-layout.
Here the syntax:
req.scripts = {
scriptName:{inner='',src='',async,crossorigin,defer,integrity,referrerpolicy,type,footer=false,v}
}
req.links = {
linkName:{href,rel='stylesheet',crossorigin,hreflang,media,referrerpolicy,sizes,type,v}
}
Example:
module.exports = function(req,res) {
let test = () => console.log('hello world')
req.scripts.test = {src:'/link-to-script/script.js}
req.scripts.testForInner = {inner:`${test.toString(); test()}`,footer:true}
req.links.test = {href:'/link-to-styles/styles.css}
}
There are middleware folders inside mw folder. Each md folder, has to include 3 files:
This file has to return object with the folowing:
If about.js is missing, about object will replaced with folowing:
let defaultAbout = {
name:dirName,
description:'No description',
version:'1.0.0',
visible:true,
author:'Admin'
}
index.js has to return middleware function wich will run in all routes (except static routes). For example:
module.exports = function(req,res,next) {
req.urlWithoutParams = req.url.split('?')[0]
return next()
}
This file will run if process.env.DEV = true.
File has to return function.
You can add in this file scripts, or settings, or write files. Anything you need for initialization.
Example:
module.exports = function(req,res,next) {
if(!req.url.startsWith('/dashboard')) {
req.scripts.accessibility = {src:'/accessibility/main.bundle.js'},
req.scripts.accessibilityInner = {inner:`window.addEventListener('load', function() { new Accessibility(); }, false);`}
}
return next()
}
Then mw installed, process.settings.mw will include list of existing plugins which looks like this:
process.settings.mw = {
active, // if true will run as mw
error, // null if not errors
about:{ // all information about plugin
name,description,version,author,visible
}
}
In dashboard settings will include plugins for setting active or inactive mw if visible.
Inside mw folder, you have csrf middleware. The middleware generating csrf token for each session if:
By default layout use:
FAQs
Build for mvc project.
The npm package als-mvc receives a total of 1 weekly downloads. As such, als-mvc popularity was classified as not popular.
We found that als-mvc 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
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.