Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
embedded-postgres
Advanced tools
A package to run an embedded Postgresql database right from NodeJS
A Node package that allows you to spawn a Postgresql cluster programatically.
npm i embedded-postgres
import EmbeddedPostgres from 'embedded-postgres';
async function main() {
// Create the object
const pg = new EmbeddedPostgres({
data_dir: './data/db',
user: 'postgres',
password: 'password',
port: 5432,
persistent: true,
});
// Create the cluster config files
await pg.inititialize();
// Start the server
await pg.start();
// Create and/or drop database
await pg.createDatabase('TEST');
await pg.dropDatabase('TEST');
// Initialize a node-postgres client
const client = pg.getPgClient();
await client.connect();
const result = await client.query('SELECT datname FROM pg_database');
// Stop the server
await pg.stop();
}
main();
Embedded Postgres was created by Lei Nelissen for BMD Studio. It is based on zonky's embedded-postgres-binaries.
FAQs
A package to run an embedded Postgresql database right from NodeJS
The npm package embedded-postgres receives a total of 1,087 weekly downloads. As such, embedded-postgres popularity was classified as popular.
We found that embedded-postgres demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.