File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ { pkgs , ... } : {
2+ channel = "stable-23.11" ;
3+ packages = [
4+ pkgs . nodejs_20
5+ ] ;
6+
7+ env = {
8+ POSTGRESQL_CONN_STRING = "postgresql://user:mypassword@localhost:5432/dataconnect?sslmode=disable" ;
9+ } ;
10+
11+ idx . extensions = [
12+ "mtxr.sqltools"
13+ "mtxr.sqltools-driver-pg"
14+ "GraphQL.vscode-graphql-syntax"
15+ "GoogleCloudTools.firebase-dataconnect-vscode"
16+ ] ;
17+
18+ services . postgres = {
19+ extensions = [ "pgvector" ] ;
20+ enable = true ;
21+ } ;
22+
23+ idx = {
24+ workspace = {
25+ onCreate = {
26+ update-firebase = "npm install -D firebase-tools" ;
27+ postgres = ''
28+ psql --dbname=postgres -c "ALTER USER \"user\" PASSWORD 'mypassword';"
29+ psql --dbname=postgres -c "CREATE DATABASE dataconnect;"
30+ psql --dbname=dataconnect -c "CREATE EXTENSION vector;"
31+ '' ;
32+ npm-install = "cd app && npm i && npm i firebase@latest" ;
33+ } ;
34+ } ;
35+ previews = {
36+ enable = true ;
37+ previews = {
38+ web = {
39+ command = [ "npm" "run" "dev" "--prefix" "./app" "--" "--port" "$PORT" "--host" "0.0.0.0" ] ;
40+ manager = "web" ;
41+ } ;
42+ } ;
43+ } ;
44+ } ;
45+ }
You can’t perform that action at this time.
0 commit comments