
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
app-context-mysql
Advanced tools
mysql initializer for app-context
This initializer can be auto-installed by using it in your context file.
This initializer will attach the configured connections to APP.mysql.
module.exports = function() {
this.runlevel('connected')
// attach a connection to APP.mysql - use the value at APP.config.mysql as the connection string
.use('mysql', '$mysql')
// attach a connection to APP.mysql
.use('mysql', 'mysql://localhost:3306/foobar')
// attach a connection pool to APP.mysql
.use('mysql', {url: 'mysql://localhost:3306/foobar', pool: true})
// create 2 connections and attach them as an object to APP.mysql
// this will create APP.mysql.users and APP.mysql.data
.use('mysql', {
users: '$mysql.users',
data: '$mysql.data'
})
// you can also pass options to each connection
.use('mysql', {
users: {url: 'mysql://localhost:3306/users', pool: true},
data: {url: 'mysql://localhost:3306/data', connectTimeout: 3000}
})
};
Each connection can be configured with either a connection string (like mysql://localhost:3306/users) or
with an object. The object will be passed through to the mysql constructor and can consist of any options
from connection options. There is a special url option not listed that this initializer will parse and fill in for you (like the user, password, host, and port).
You can make any connection a pool by adding {pool: true} to the configuration. Other options from the
configuration will be passed through to the mysql driver. You can see the available options at connection options and pool options.
FAQs
mysql initializer for app-context
The npm package app-context-mysql receives a total of 14 weekly downloads. As such, app-context-mysql popularity was classified as not popular.
We found that app-context-mysql 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 critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.