cs461-text-adventure / code

0 stars 1 forks source link

Text Adventure Game for Education

Prerequisites

Ensure you have the following installed:

Installation

1. Install Dependencies

Run the following command to install necessary dependencies:

cd /api
npm install
cd /web
npm install

2. Configure Postgres Connection

Modify the .env file located in the /api directory to specify your Postgres connection URL.

Example .env file:

DATABASE_URL=postgres://username:password@localhost:5432/database

3. Create Database Tables

Run the following command to generate migrations:

npx drizzle-kit generate

Run the following command to apply migrations:

npx drizzle-kit migrate

Running the application

adding 'hello world' to test environment integration

"hello world!"

To start the API:

cd /api
npm run dev

To start the frontend:

cd /web
npm run dev