🎃 Slonik 🎃

Slonik is an easy to use SQL-first Postgres client for NodeJS. Over his years of dedicated work, Gajus had made a library that brings the best-in-class F/OSS database to more and more people (and projects) every day!

🚀 Project of the day: Slonik 🐘

GitHub - gajus/slonik: A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL.
A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL. - GitHub - gajus/slonik: A Node.js PostgreSQL client with runtime and build time type safety, and composable...

Slonik is an NodeJS library for accessing and manipulating databases with a unique developer experience ("DX") – it encourages you to write SQL as plainly as possible:

import {
  createPool,
  sql,
} from 'slonik';

const pool = await createPool('postgres://');

const main = async () => {
  await pool.query(sql`
    SELECT * FROM users WHERE requirement = 'met';
  `);

  await pool.end();
};

main();
A script displaying basic database access with Slonik

Slonik has steadily gained features, functionality and Github ⭐s since it's creation in 2017 (that's 5 years and counting).

Gajus has put a thousands of tens of thousands of hours into making a NodeJS Postgres driver that makes the world's best F/OSS database shine for even more use cases, and that's awesome.