Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.1 KB

README.md

File metadata and controls

42 lines (30 loc) · 1.1 KB

Running Neon database migrations using Drizzle

This application is a simple typescript API using Drizzle ORM, Neon and Hono.js. It returns a list of authors and books written by them. This project uses Drizzle to generate and run database migrations.

To build this project from scratch, check out the guide in Neon's documentation.

Set up locally

You will need the following:

  • A Neon account and a project
  • Node.js and npm
  1. Clone this repository.
git clone https://github.com/neondatabase/guide-neon-drizzle
  1. Navigate to the project directory and install the dependencies.
cd guide-neon-drizzle
npm install
  1. Create a .env file in the root of the project and add the following environment variables:
DATABASE_URL=
  1. Run the migrations using Drizzle.
npm run db:migrate
  1. Start the server.
npm run dev
  1. Visit http://localhost:3000 in your browser to see the list of authors and books.