Skip to content

Commit

Permalink
docs: Add bun-bakery template (oven-sh#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapsonfire-DE authored Jul 13, 2022
1 parent 5a2425d commit 8e90421
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 0 deletions.
42 changes: 42 additions & 0 deletions examples/bun-bakery/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

**/*.trace
**/*.zip
**/*.tar.gz
**/*.tgz
**/*.log
package-lock.json
**/*.bun
Binary file added examples/bun-bakery/assets/bunbakery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions examples/bun-bakery/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {Router} from "@kapsonfire/bun-bakery"


new Router({
port: 3000,
assetsPath: import.meta.dir + '/assets/',
routesPath: import.meta.dir + '/routes/'
})
7 changes: 7 additions & 0 deletions examples/bun-bakery/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"version": "1.0.0",
"name": "@bun-examples/bun-bakery",
"dependencies": {
"@kapsonfire/bun-bakery": "^0.2.0"
}
}
5 changes: 5 additions & 0 deletions examples/bun-bakery/routes/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {Context} from "@kapsonfire/bun-bakery"

export async function GET(ctx: Context) {
ctx.sendHTML('<img src="/assets/bunbakery.png"><h1>Hello World!</h1>');
}
7 changes: 7 additions & 0 deletions examples/bun-bakery/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"types": ["bun-types"],
"module": "esnext",
"moduleResolution": "Node"
}
}

0 comments on commit 8e90421

Please sign in to comment.