LogoGalsenext
Guide et Tutoriel

Neon

---

Neon is a serverless PostgreSQL database that simplifies database management with flexible scalability. To use Neon with Galsenext, follow the instructions below.

Prerequisites

Before you begin, ensure you have the following:

  • A Neon account. If you don't have an account yet, sign up at Neon.

Creating and Configuring the Database

1. Create a Database on Neon

  1. Log in to your Neon account.
  2. In the Neon dashboard, click on Create Database.
  3. Give your database a name and select the deployment region that suits you.
  4. Click on Create to create your database.

2. Obtain Connection Information

Once your database is created, you will need several details to configure your project:

  • DATABASE_URL: The connection URL for your database. You can find it in your database settings on Neon.

Here is an example of a connection URL:

postgresql://username:password@hostname:port/database

3. Configure Your .env File

Add your Neon database connection information to your .env file at the root of your project. Here is an example configuration:

DATABASE_URL=postgresql://username:password@hostname:port/database

Example of Connecting to Neon with Prisma

Ensure that the prisma/schema.prisma file uses the DATABASE_URL environment variable to connect to your Neon database:

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

Important Points

  • Check Connection Information: Ensure that the connection URL is correct and that the information is up-to-date in your .env file.
  • Consult Neon Documentation: For more details on configuring and using Neon, refer to the official Neon documentation.

Troubleshooting

If you encounter connection issues or other errors related to Neon, here are some troubleshooting steps:

  • Check the Connection URL: Make sure the connection URL in the .env file is correct.
  • Test the Connection: Use a PostgreSQL client to test the connection to the database with the provided information.
  • Check Logs: Review your application's and Neon's logs for error messages that might provide clues about the issues encountered.

On this page