Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
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
Try with a base project
https://github.com/fdorantesm/express-assap
No, and we'll hope not.
FAQs
NodeJS mvc framework structure, as simple as possible
The npm package asapp receives a total of 91 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.