Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

README update for .env files #22

Merged
merged 4 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ See our docs for more info on how to use the library.

### Examples

To run an example, clone the repo and run the following commands

To run an example, clone the repo and follow these steps
1. Copy contents of `/apps/web/.env.example` into a new file, `/apps/web/.env`
2. Copy contents of `/examples/.env.example` into a new file, `/examples/.env` and add your [OpenAI API Key](https://openai.com/api/) to the `OPENAI_API_KEY` field
3. Run the following commands:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a script would be great for this, when executing the example script a check verifies if the .env are present, if not, then it can do steps 1 and 2 automatically and ask the user for OpenAI API Key

Copy link
Collaborator Author

@justinliang1020 justinliang1020 Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, i'll make a separate issue for this (after this PR is closed)

```
pnpm i
pnpm dev
```
4. Run the following command in a different terminal window/tab:
*NOTE: example names found in [/examples/src](https://github.com/cfortuner/promptable/tree/main/examples/src)
```
pnpm run example <example name>
```

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/gpt-prisma-seed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# How to run

make sure you're in gpt-prisma-seed directory. copy .env.example to .env, add your openAI key
Copy .env.example to .env, add your openAI key

all the relevant code is in prisma/seed.ts
Script for seeding is in prisma/seed.ts

run commands:

Expand Down