@@ -6,10 +6,10 @@ title: >
6
6
import { Code } from " @astrojs/starlight/components" ;
7
7
import { Aside } from " @astrojs/starlight/components" ;
8
8
9
- This tutorial is a short introduction to TrailBase and some of its features.
9
+ This article is a short introduction to TrailBase and some of its features.
10
10
We'll bootstrap a database with coffee data, implement a custom TypeScript HTTP
11
- handler for finding the best coffee matches using vector search, and deploy a
12
- simple production-ready web app all in ~ 100 lines of code.
11
+ handler for finding the best matches using vector search, and deploy a simple
12
+ production-ready web app all in ~ 100 lines of code.
13
13
14
14
<div class = " flex justify-center" >
15
15
<div class = " w-[80%] shadow-lg " >
@@ -35,7 +35,8 @@ import GettingTrailBase from "./_getting_trailbase.md";
35
35
36
36
## Importing Data
37
37
38
- We'll use the ` sqlite3 ` CLI[ ^ 1 ] directly to import
38
+ Before building the app, let's import some data. Keeping it simple,
39
+ we'll use the ` sqlite3 ` CLI[ ^ 1 ] directly to import
39
40
` examples/coffeesearch/arabica_data_cleaned.csv ` with the following SQL
40
41
script:
41
42
@@ -50,8 +51,8 @@ import importScript from "../../../../../examples/coffeesearch/import.sql?raw";
50
51
51
52
Note that we didn't initialize the vector ` embedding ` . This is merely because
52
53
` sqlite3 ` doesn't have the necessary extensions built-in.
53
- We'll update the entries to add the embedding later as part of our initial
54
- database migrations shortly [ ^ 2 ] .
54
+ We'll update the entries later on, adding the embedding as part of our initial
55
+ database migrations[ ^ 2 ] .
55
56
56
57
From within the ` example/coffeesearch ` directory, you can execute the script
57
58
above and import the coffee data by running:
@@ -138,7 +139,7 @@ In case you want to build your own, we recommend
138
139
framework, e.g.: ` npm create vite@latest my-project -- --template react ` .
139
140
140
141
Our provided reference implementation, renders 4 numeric input fields to search
141
- for coffee with a given aroma, flavor, acidity and sweetness score:
142
+ for coffee with a certain aroma, flavor, acidity and sweetness score:
142
143
143
144
import uiCode from " ../../../../../examples/coffeesearch/src/App.tsx?raw" ;
144
145
@@ -173,9 +174,10 @@ as well as custom API by running:
173
174
$ trail run --public-dir dist
174
175
```
175
176
176
- You can now check out your fuly self-contained app under
177
- [ http://localhost:4000/ ] ( http://localhost:4000/ ) or browse the coffee data in
178
- the [ admin dashboard] ( http://localhost:4000/_/admin ) .
177
+ You can now check out your fully self-contained app under
178
+ [ http://localhost:4000/ ] ( http://localhost:4000/ ) or browse the coffee data and
179
+ access logs in the [ admin dashboard] ( http://localhost:4000/_/admin ) .
180
+ The admin credentials are logged to the terminal on first start.
179
181
180
182
All[ ^ 4 ] we need to serve our application in production is:
181
183
0 commit comments