Skip to content

Commit 3a1e828

Browse files
fix redirects and format
1 parent 4201ea4 commit 3a1e828

File tree

3 files changed

+41
-37
lines changed

3 files changed

+41
-37
lines changed

learn/getting-started/create-your-first-application.mdx

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ Get started by cloning the [`HarperFast/create-your-first-application`](https://
6262
git clone https://github.com/HarperFast/create-your-first-application.git first-harper-app
6363
```
6464

65-
</TabItem>
66-
<TabItem value="fabric" label="Fabric">
65+
</TabItem>
66+
<TabItem value="fabric" label="Fabric">
6767

6868
From the Cluster page, navigate to the Applications tab and click on "New Application" on the left-hand sidebar.
6969

@@ -75,7 +75,8 @@ Keep the "Install Command" empty and the "Authorization" as "Public Access".
7575

7676
Finally, click the "Import Application" button and wait for the application to be instantiated.
7777

78-
</TabItem>
78+
</TabItem>
79+
7980
</Tabs>
8081

8182
## Creating a Table
@@ -87,12 +88,13 @@ The core of most Harper applications is the data. Harper's data system is made u
8788

8889
Open `schema.graphql` in your text editor.
8990

90-
</TabItem>
91-
<TabItem value="fabric" label="Fabric">
91+
</TabItem>
92+
<TabItem value="fabric" label="Fabric">
9293

9394
Navigate to the Files tab for your new application and open the `schema.graphql` file.
9495

95-
</TabItem>
96+
</TabItem>
97+
9698
</Tabs>
9799

98100
Within `schema.graphql`, add:
@@ -154,12 +156,13 @@ Within your application directory, open a command line and run `harperdb dev .`
154156

155157
The `dev` command will watch all files (except for `node_modules` directory) within your application directory and restart Harper when changes are detected.
156158

157-
</TabItem>
158-
<TabItem value="fabric" label="Fabric">
159+
</TabItem>
160+
<TabItem value="fabric" label="Fabric">
159161

160162
Click "Restart Cluster" to apply the new file changes.
161163

162-
</TabItem>
164+
</TabItem>
165+
163166
</Tabs>
164167

165168
## Enabling the REST API
@@ -188,20 +191,21 @@ rest: true
188191

189192
If Harper is still running with the `dev` command, it should have automatically restarted.
190193

191-
If you look closely at the Harper logs, a new line should be added to the system configuration details:
194+
If you look closely at the Harper logs, a new line should be added to the system configuration details:
192195

193196
```
194197
REST: HTTP: 9926
195198
```
196199

197200
This line tells you that the Harper REST API is configured on port `9926` (this is configurable, and this value is the default).
198201

199-
</TabItem>
200-
<TabItem value="fabric" label="Fabric">
202+
</TabItem>
203+
<TabItem value="fabric" label="Fabric">
201204

202205
Click "Restart Cluster" to apply the new file changes.
203206

204-
</TabItem>
207+
</TabItem>
208+
205209
</Tabs>
206210

207211
## Create a Record
@@ -235,15 +239,15 @@ curl 'http://localhost:9926/Dog/' \
235239

236240
```typescript
237241
const response = await fetch('http://localhost:9926/Dog/', {
238-
method: "POST",
242+
method: 'POST',
239243
headers: {
240-
"Content-Type": "application/json"
244+
'Content-Type': 'application/json',
241245
},
242246
body: JSON.stringify({
243-
"name": "Harper",
244-
"breed": "Black Labrador / Chow Mix",
245-
"age": 5
246-
})
247+
name: 'Harper',
248+
breed: 'Black Labrador / Chow Mix',
249+
age: 5,
250+
}),
247251
});
248252
const id = await response.text();
249253
console.log(id);
@@ -283,10 +287,10 @@ You should see the record we just created returned as JSON:
283287

284288
```json
285289
{
286-
"name": "Harper",
287-
"breed": "Black Labrador / Chow Mix",
288-
"age": 5,
289-
"id": "<id>"
290+
"name": "Harper",
291+
"breed": "Black Labrador / Chow Mix",
292+
"age": 5,
293+
"id": "<id>"
290294
}
291295
```
292296

@@ -319,12 +323,12 @@ Search queries return a list of records that match the specified conditions, in
319323

320324
```json
321325
[
322-
{
323-
"name": "Harper",
324-
"breed": "Labrador",
325-
"age": 7,
326-
"id": "<id>"
327-
}
326+
{
327+
"name": "Harper",
328+
"breed": "Labrador",
329+
"age": 7,
330+
"id": "<id>"
331+
}
328332
]
329333
```
330334

redirects.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function generateDocsRedirects(basePath: string): RedirectRule[] {
7070
{ from: withBase('/install-harperdb/node-ver-requirement'), to: withBase('/deployments/install-harper/') },
7171
{ from: withBase('/deployments/install-harperdb'), to: withBase('/deployments/install-harper/') },
7272
{ from: withBase('/deployments/install-harperdb/linux'), to: withBase('/deployments/install-harper/linux') },
73-
{ from: withBase('/getting-started/install-harper'), to: withBase('/getting-started/installation') },
73+
{ from: withBase('/getting-started/install-harper'), to: withBase('/learn/getting-started/install-and-connect-harper') },
7474

7575
// Harper Studio (old HarperDB Studio paths)
7676
{ from: withBase('/harperdb-studio'), to: withBase('/administration/harper-studio/') },
@@ -200,10 +200,10 @@ function generateDocsRedirects(basePath: string): RedirectRule[] {
200200
to: withBase('/learn/getting-started/install-and-connect-harper'),
201201
},
202202

203-
{ from: withBase('/getting-started/quickstart'), to: withBase('/learn/getting-started/quickstart') },
204-
{ from: withBase('/4.6/getting-started/quickstart'), to: withBase('/learn/getting-started/quickstart') },
205-
{ from: withBase('/4.5/getting-started/quickstart'), to: withBase('/learn/getting-started/quickstart') },
206-
{ from: withBase('/4.4/getting-started/quickstart'), to: withBase('/learn/getting-started/quickstart') },
203+
{ from: withBase('/getting-started/quickstart'), to: withBase('/learn/') },
204+
{ from: withBase('/4.6/getting-started/quickstart'), to: withBase('/learn/') },
205+
{ from: withBase('/4.5/getting-started/quickstart'), to: withBase('/learn/') },
206+
{ from: withBase('/4.4/getting-started/quickstart'), to: withBase('/learn/') },
207207

208208
{ from: withBase('/foundations/harper-architecture'), to: withBase('/learn/') },
209209
{ from: withBase('/4.6/foundations/harper-architecture'), to: withBase('/learn/') },

sidebarsLearn.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ const sidebarsLearn: SidebarsConfig = {
1616
{
1717
type: 'doc',
1818
id: 'getting-started/install-and-connect-harper',
19-
label: 'Install and Connect Harper'
19+
label: 'Install and Connect Harper',
2020
},
2121
{
2222
type: 'doc',
2323
id: 'getting-started/create-your-first-application',
24-
label: 'Create your First Application'
25-
}
24+
label: 'Create your First Application',
25+
},
2626
],
2727
},
2828
{

0 commit comments

Comments
 (0)