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