Quickstart
How to get the Conduit (RealWorld) app running locally.
This guide will walk you through setting up the reference implementation of the Bedstack architecture: the Conduit (RealWorld) app.
Prerequisites
Ensure you have the following installed on your machine:
Clone the Repository
Clone the Bedstack monorepo which contains the conduit application:
git clone https://github.com/yamcodes/bedstack.git
cd bedstackInstall Dependencies
Bedstack uses Bun's built-in package manager. Run the following command in the root directory:
bun installEnvironment Variables
The application requires some environment variables to connect to the database and sign JWTs. Bedstack uses ArkEnv to ensure these are valid at startup. Copy the example file:
cp apps/conduit/.env.example apps/conduit/.envDatabase Setup
We use Docker Compose to spin up a local PostgreSQL instance.
# Start the database container
bun run --cwd apps/conduit db:startOnce the database is running, apply the schema and seed it with initial data:
# Push the schema to the DB
bun run --cwd apps/conduit db:push
# Seed with initial data
bun run --cwd apps/conduit db:seedRun the Application
Now you can start the development server:
bun run --cwd apps/conduit devThe API is now available at http://localhost:3000/api. You can also visit http://localhost:3000/swagger to explore the interactive API documentation.