
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
As simple as possible project structure
Root and directory path now is based in main node_modules directory instead require.main.filename.
This update let you :
Serve the application inside another directories, like bin. If you use express-generator try it please.
Better app structure
ROOT: Returns absolute project path. eg: /home/fdorantesm/www/ilumont
application alias to app: If you define express application as 'app' you couldn't to used the destruct syntax before.
npm i --save asapp
Note: Use lower case to call these functions
app ├── config ├── db │ ├── models │ ├── schemas ├── helpers ├── http │ ├── controllers │ ├── middlewares │ ├── routes ├── libraries ├── locales
You can add subdirectories and call modules using the same function as normally: asapp.helpers('payments/visa')
var express = require('express')
var app = express()
var {config, route} = require('asapp')
app.locals(config('locals'))
app.use('/', route('router'))
module.exports = app
Meanwhile in app...
. ├── app │ ├── config │ │ ├── locals.js │ ├── http │ │ ├── controllers │ │ ├── middlewares │ │ │ └── test.js │ │ └── routes │ │ ├── router.js │ │ └── test.js
router.js
var express = require('express')
var app = express()
var asapp = require('asapp')
app.use('/test', asapp.route('test'))
module.exports = app
No, and we'll hope not.
FAQs
NodeJS mvc framework structure, as simple as possible
The npm package asapp receives a total of 88 weekly downloads. As such, asapp popularity was classified as not popular.
We found that asapp 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.