Skip to content

Commit cf7abc9

Browse files
feat: Update readme with new serve feature
1 parent b3a4c03 commit cf7abc9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,16 @@ $ dg
3838
Usage dg:
3939
-c string
4040
the absolute or relative path to the config file
41+
-cpuprofile string
42+
write cpu profile to file
43+
-i string
44+
write import statements to file
4145
-o string
4246
the absolute or relative path to the output dir (default ".")
47+
-p int
48+
port to serve files from (omit to generate without serving)
49+
-version
50+
display the current version number
4351
```
4452

4553
Create a config file. In the following example, we create 10,000 people, 50 events, 5 person types, and then populate the many-to-many `person_event` resolver table with 500,000 rows that represent the Cartesian product between the person and event tables:
@@ -112,7 +120,7 @@ tables:
112120
113121
Run the application:
114122
```
115-
$ dg -c your_config_file.yaml -o your_output_dir
123+
$ dg -c your_config_file.yaml -o your_output_dir -p 3000
116124
loaded config file took: 428µs
117125
generated table: person took: 41ms
118126
generated table: event took: 159µs
@@ -136,12 +144,6 @@ your_output_dir
136144
└── person_type.csv
137145
```
138146

139-
If you're following along locally, spin up a local web server using something like python's `http.server`:
140-
141-
```
142-
$ python3 -m http.server 3000 -d your_output_dir
143-
```
144-
145147
Then import the files as you would any other; here's an example insert into CockroachDB:
146148

147149
``` sql

0 commit comments

Comments
 (0)