Skip to content

Commit ebdaf9c

Browse files
committed
Wrote a readme and moved around some code
1 parent 9e9b6d5 commit ebdaf9c

File tree

6 files changed

+269
-107
lines changed

6 files changed

+269
-107
lines changed

README.md

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
# hellonode typescript
1+
# Shiki Service
22

3-
## A Fly Example
3+
This service provides an API to produce shiki-twoslash html for a given code snippet.
44

5-
This is a simple application used in the [fly.io Getting Started](https://fly.io/docs/getting-started/node/) documentation showing how to deploy a Node application using Flyctl's builtin Nodejs deployment option.
5+
## API
66

7-
* Run flyctl init
8-
* When prompted for a builder, select builtin Nodejs.
9-
* Run flyctl deploy
7+
### `POST /v1/`
108

9+
#### Request
10+
11+
```json
12+
{
13+
"code": "const a = 1",
14+
"lang": "ts",
15+
"meta": "twoslash", // optional
16+
"theme": "github-dark" // optional
17+
}
18+
```
19+
20+
#### Response
21+
22+
Responds with html string.

env.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { environmentSchema } from "./schema.js";
2+
3+
export const env = environmentSchema.parse(process.env);

0 commit comments

Comments
 (0)