Add early return with specific message if database url does not exist in env file
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
What problem will this feature address?
Hello,
When i tried to set my development environment up i faced an issue on migration of PostgreSQL. There was no specific message about what did i do wrong so i struggled debugging the problem. If we add an early return to the migration file the problem will be prompted more specifically.
Describe the solution you'd like
const connectionString = process.env.DATABASE_URL!;
if (!connectionString) {
throw new Error("DATABASE_URL is not set in env file");
}
Describe alternatives you've considered
const connectionString = process.env.DATABASE_URL!;
if (!connectionString) {
throw new Error("DATABASE_URL is not set in env file");
}
Additional context
Try to run pnpm run dokploy:setup without DATABASE_URL. (Delete from env file or just pass the step of copying example env file.)
Will you send a PR to implement it?
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run pnpm run dokploy:setup without DATABASE_URL to reproduce the migration failure. Locate the migration file involved in that setup command, add the requested early error path, and confirm the missing variable produces the specific message instead of the existing failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, typescript
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100