Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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({
databaseDir: './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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.