Skip to content

Commit

Permalink
docs(readme): add online playground and aligne with hello-world (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux authored Apr 6, 2022
1 parent fbd3d8f commit fc389a0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
🎁 [Contributions](#-contribution) are more than welcome to improve documentation.

💡 [Tell us your ideas](https://github.com/unjs/nitro/discussions/new) too!

🏀 [Online playground](https://stackblitz.com/github/unjs/nitro/tree/main/examples/hello-world) on StackBlitz
<hr>
<br>

Expand Down Expand Up @@ -37,9 +39,9 @@ mkdir nitro-app
cd nitro-app
```

1️⃣ Create `api/test.ts`:
1️⃣ Create `api/hello.ts`:

```ts [api/test.ts]
```ts [api/hello.ts]
export default () => 'Nitro is amazing!'
```

Expand All @@ -49,7 +51,7 @@ export default () => 'Nitro is amazing!'
npx nitropack dev
```

🪄 Your API is ready at http://localhost:3000/api/test
🪄 Your API is ready at http://localhost:3000/api/hello

**🤓 [TIP]** Check `.nitro/dev/index.mjs` if want to know what is happening

Expand Down

0 comments on commit fc389a0

Please sign in to comment.