Skip to content

Commit

Permalink
Merge pull request #36 from Huy-DNA/chore/setup-nix-dev-env
Browse files Browse the repository at this point in the history
chore: config shell.nix
  • Loading branch information
Huy-DNA authored Jan 12, 2025
2 parents 9573c58 + c365dc4 commit d808b8f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
DATABASE_USER=admin
DATABASE_USER=
DATABASE_HOST=localhost
DATABASE_NAME=console_cast
DATABASE_PASSWORD=secret
DATABASE_PORT=5432
JWT_SECRET=,
NODE_ENV=,
DATABASE_URL=postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
JWT_SECRET=
NODE_ENV=
DATABASE_URL=postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}?sslmode=disable
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build/
.cache/
.env
zapatos/
.data/
Binary file modified bun.lockb
Binary file not shown.
13 changes: 13 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,18 @@ pkgs.mkShell {
packages = with pkgs; [
postgresql_16
bun
dbmate
neovim
zsh
];

PGDATA = "./.data";

shellHook = ''
initdb
pg_ctl start
createdb
echo "To start, run `bun db:create` and then `bun db:migrate`"
alias vim=nvim
'';
}

0 comments on commit d808b8f

Please sign in to comment.