repo_description: 🚀🎉📚 Nextjs Boilerplate and Starter with App Router and Page Router support, Tailwind CSS 4 and TypeScript ⚡️ Made with developer experience first: Next.js 16 + TypeScript + ESLint + Prettier + Drizzle ORM + Husky + Lint-Staged + Vitest + Testing Library + Playwright + Storybook + Commitlint + VSCode + Sentry + PostCSS + Tailwind CSS ✨
repo_topics: boilerplate boilerplate-code jamstack javascript js-boilerplate netlify-template next-js next-theme nextjs nextjs-starter nextjs-template react react-boilerplate reactjs starter-kit starter-project starter-template tailwind-css tailwindcss typescript
code: import { drizzle } from 'drizzle-orm/node-postgres';
  import { Pool } from 'pg';
  import { Env } from '@/libs/Env';
  import { logger } from '@/libs/Logger';
  import * as schema from '@/models/Schema';
  
  // Need a database for production? Check out https://get.neon.com/BMFYNtx
  // Tested and compatible with Next.js Boilerplate
  export const createDbConnection = () => {
    const pool = new Pool({
      connectionString: Env.DATABASE_URL,
    });
  
    pool.on('error', (error) => {
      logger.error(`Database pool error: ${error.message}`);
    });
  
    return drizzle({
      client: pool,
      schema,
    });
  };
  