Skip to content

Commit f50bd21

Browse files
committed
chore: wip
1 parent ce7f788 commit f50bd21

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

bun.lockb

-3.86 KB
Binary file not shown.

routes/api.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,17 @@ import { route } from '@stacksjs/router'
88
* @see https://stacksjs.org/docs/routing
99
*/
1010

11-
// $APP_URL/api
12-
await route.get('/', () => 'hello world')
13-
14-
// $APP_URL/api/welcome
15-
await route.get('/welcome', () => {
11+
await route.get('/', () => 'hello world') // $APP_URL/api
12+
await route.get('/hello/world', () => 'hello world, buddy') // stacksjs.org/api/hello/world
13+
await route.get('/buddy/versions', 'Actions/Buddy/VersionsAction') // stacksjs.org/api/buddy/versions
14+
await route.get('/buddy/commands', 'Actions/Buddy/CommandsAction') // stacksjs.org/api/buddy/commands
15+
await route.get('/welcome', () => { // $APP_URL/api/welcome
1616
return { // you may return an object as well
1717
data: 'hello world, friend',
1818
}
1919
})
2020

21-
await route.get('/hello/world', () => 'hello world, buddy') // stacksjs.org/api/hello/world
22-
await route.get('/buddy/versions', 'Actions/Buddy/VersionsAction')
23-
await route.get('/buddy/commands', 'Actions/Buddy/CommandsAction')
21+
await route.health() // adds an `/api/health` route
2422

2523
// await route.group('/buddy', async () => { // you may group your routes in a few different ways
2624
// await route.get('/commands', 'Actions/Buddy/CommandsAction')
@@ -35,5 +33,3 @@ await route.get('/buddy/commands', 'Actions/Buddy/CommandsAction')
3533

3634
// await route.action('/example') // the equivalent of route.get('/example', 'ExampleAction')
3735
// await route.job('/example-two') // the equivalent of route.get('/example-two', 'ExampleTwoJob')
38-
39-
await route.health() // adds an `/api/health` route

storage/framework/core/cloud/src/cloud/router-layer/nodejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"test": "echo \"Error: no test specified\" && exit 1"
1111
},
1212
"dependencies": {
13-
"@stacksjs/router": "^0.58.71"
13+
"@stacksjs/router": "^0.58.72"
1414
}
1515
}

0 commit comments

Comments
 (0)