Skip to content

Commit 0c5bcf6

Browse files
committed
🎉 feat: cjs
1 parent ace4113 commit 0c5bcf6

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

bun.lockb

10 Bytes
Binary file not shown.

example/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Elysia } from 'elysia'
2-
import cors from '../src/index'
2+
import { cors } from '../src/index'
33

44
const app = new Elysia()
5-
.use(cors({
6-
maxAge: 5
7-
}))
8-
.get('/', () => ({
9-
hello: 'world'
10-
}))
11-
.post('/', () => 'Hi')
12-
.listen(8080)
5+
.use(cors())
6+
.get('/', () => ({ same: 'a' }))
7+
.listen(3000)
8+
9+
console.log(`Elysia is running at ${app.server?.hostname}:${app.server?.port}`)
10+
11+
export type App = typeof app
12+
console.log('Server is running on port 3000.')

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@elysiajs/cors",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Plugin for Elysia that for Cross Origin Requests (CORs)",
55
"author": {
66
"name": "saltyAom",
@@ -43,4 +43,4 @@
4343
"peerDependencies": {
4444
"elysia": ">= 0.5.12"
4545
}
46-
}
46+
}

0 commit comments

Comments
 (0)