Development
Get started with the code and develop your app.
Create a new database
By default, DirEasy uses Neon as its database provider and Drizzle as its ORM.
Make sure to have created a new database and have the connection string ready. For example when using PostgreSQL, the connection string will look something like this:
Set up the environment variables
Set or modify environment variables with your own values in .env
file.
You can read more about environment variables here.
Configure the database
You will need to scaffold the database using the schema defined in /drizzle/db/schema.ts
:
For more details on the default Drizzle configuration (using Neon), refer to the Database Configuration Guide.
Seed the categories
You will need to seed the database with the default categories which is suited for a tech directory website:
If you want to add more or change the categories, you can do so by editing the
categories.ts
file.
Start your development server
Now your app should be ready to go. To start the local development server.
Open the localhost URLs below to see the app. 🎉
- http://localhost:3000/ — The Main app.
Signup a new account
Open your app and signup a new account (it will be your admin).
Set Admin account
Run the admin seed to give the first signup account the admin role to access the admin functions: