A recipe database for nutrient tracking
Ensure the following are installed on your system:
- Node.js (v20.18.1)
- PostgreSQL
- TablePlus or a similar database GUI tool
- Open TablePlus (or your preferred GUI tool).
- Connect to your local PostgreSQL instance.
- Create a new database named
nugget
.
-
Clone the Repository:
git clone <repository-url> cd nugget
-
Install Dependencies:
npm install
-
Configure Environment Variables: Create a
.env
file in the root directory and add the following:PGHOST=localhost PGPORT=5432 PGDATABASE=nugget PGUSER=<your_username> PGPASSWORD=<your_password>
-
Prepare the Project: Run the post-installation script to set up the application:
npm run postinstall
-
Run Database Migrations: Ensure PostgreSQL is running and migrate the database:
npm run migrate up
To start the development server:
npm run dev
To build and preview the production version:
-
Build the project:
npm run build
-
Preview the production build:
npm run preview
To apply new migrations or update the database schema, use the following command:
npm run migrate up
Ensure that PostgreSQL is running and your .env
file is correctly configured before running the command.