
Security News
Cline CLI npm Package Compromised via Suspected Cache Poisoning Attack
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.
express-me
Advanced tools
Create ExpressJS apps with the most common modules initialized automatically.
Using npm:
$ npm install express-me --save
Using yarn:
$ yarn add express-me
// Load the module.
const expressMe = require('express-me')
// See #options for more details about accepted options.
let options = {}
// Initialize the module.
expressMe(options, (app, http) => {
// Register application routes and middleware.
})
Here is a list of available options:
bugsnagSpecifies if to send errors to Bugsnag. Uses the report-error module.
Accepts one of the following values:
false - disable this feature.String - enable this feature and use provided value as the Bugsnag API key.Default value: false
morganSpecifies if to use morgan logger.
Accepts one of the following values:
false - disable logger.true - enable a default logger when in development mode.String - enable logger with given format.Object - enable logger with given format and options arguments.Default value: true
dbSpecifies if to connect to the database using mongoose module.
Accepts one of the following values:
false - disable this feature.Object - enable this feature and connect using provided connection details.Default value: false
Connection details object structure:
{
"host": "127.0.0.7",
"port": 27017,
"name": "database_name"
}
helmetSpecifies if to initialize helmet module.
Accepts one of the following values:
false - disable this feature.true - enable this feature and initialize helmet with default options.Object - enable this feature and initialize using provided helmet options.Default value: true
For more details about helmet options see helmet module.
compressionSpecifies if to initialize compression module.
Accepts one of the following values:
false - disable this feature.true - enable this feature and initialize compression with default options.Object - enable this feature and initialize using provided compression options.Default value: true
For more details about compression options see compression module.
staticSpecify static directories.
Accepts one of the following values:
false - disable this feature.true - enable this feature and use default static directories.String, Array - enable this feature and use provided static directories.Default value: true
let staticDirectories = [
path.join(process.cwd(), 'client', 'dist'),
path.join(process.cwd(), 'client', 'dist', 'favicon')
]
staticPrefixSpecify if to use a prefix for static files.
Accepts one of the following values:
undefined - do not use a prefix.String - use it's value as a prefix.Default value: undefined
assetVersionsSpecifies it to use the express-asset-versions module.
Accepts one of the following values:
false - disable this feature.true - enable this feature and use a default directory.String - enable this feature and use provided value as a directory.Default value: true
let assetPath = path.join(process.cwd(), 'client', 'dist')
For more details see express-asset-versions module.
viewsSpecify the directory or directories for the views.
Accepts one of the following values:
false - disable this feature.true - enable this feature and use a default directory.String, Array - enable this feature and use provided directories.Default value: true
let viewsPath = path.join(process.cwd(), 'views')
viewEngineSpecify the view engine of the application.
Accepts one of the following values:
false - disable this feature.true - enable this feature and use a default view engine.String - enable this feature and use provided view engine.Default value: true
let viewEngine = 'pug'
cookiesSpecifies if to initialize cookie-parser module.
Accepts one of the following values:
false - disable this feature.true - enable this feature and initialize cookie-parser with default options.String - enable this feature and initialize using provided secret.Default value: true
For more details about cookie-parser options see cookie-parser module.
detectIpSpecifies if to initialize detect-ip module.
Accepts one of the following values:
false - disable this feature.true - enable this feature and initialize detect-ip with default options.Object - enable this feature and initialize using provided options.Default value: true
For more details about detect-ip options see detect-ip module.
ipCountrySpecifies if to initialize ip-country module.
Accepts one of the following values:
false - disable this feature.true - enable this feature and initialize ip-country with default options.Object - enable this feature and initialize using provided options.Default value: true
For more details about ip-country options see ip-country module.
i18nSpecifies if to initialize i18n module.
Accepts one of the following values:
false - disable this feature.Object - enable this feature and initialize using provided options.Default value: false
For more details about i18n options see i18n module.
cdnjsSpecifies if to initialize cdnjs-env module.
Accepts one of the following values:
false - disable this feature.true - enable this feature and initialize cdnjs-env with default options.Default value: true
For more details about cdnjs-env options see cdnjs-env module.
localPriceSpecifies if to initialize local-price module.
Accepts one of the following values:
false - disable this feature.true - enable this feature and initialize local-price with default options.String - enable this feature and set the given default currency.Default value: true
errorHandlerDefine a custom error handler. more details
Function.When not provided a default error handler is used.
errorViewSpecify a full path to a view which will be rendered on errors.
String.When not provided a default error handler is used.
portSpecify a port for the application.
Number.Default value: 3000
The MIT License (MIT)
Copyright (c) 2017 Ion Suman sumanion122@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Create ExpressJS apps with the most common modules initialized automatically.
We found that express-me 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
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.

Product
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.