Skip to content

Commit 4306072

Browse files
author
v1rtl
committed
chore: update examples
1 parent 4e59f50 commit 4306072

31 files changed

Lines changed: 5914 additions & 416 deletions

File tree

examples/couchdb/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { App } from '@tinyhttp/app'
22
import * as dotenv from '@tinyhttp/dotenv'
3-
import bodyParser from 'body-parser'
3+
import * as bodyParser from 'milliparsec'
44
import Nano from 'nano'
55

66
const app = new App()
@@ -20,7 +20,7 @@ const nano = Nano(COUCHDB_URI)
2020
const todoDB = nano.db.use('todos')
2121

2222
// parse
23-
app.use('/todos', bodyParser.urlencoded({ extended: false }))
23+
app.use('/todos', bodyParser.urlencoded())
2424
app.use('/todos', bodyParser.json())
2525

2626
// get all tasks
@@ -50,4 +50,4 @@ app.delete('/todos', async (req, res) => {
5050
res.send(`Task "${task} has been removed!"`)
5151
})
5252

53-
app.listen(PORT, () => console.log(`server is live at ${PORT}`))
53+
app.listen(PORT, () => console.log(`Started on http://localhost:${PORT}`))

examples/couchdb/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
"dependencies": {
66
"@tinyhttp/app": "workspace:*",
77
"@tinyhttp/dotenv": "workspace:*",
8-
"body-parser": "1.19.0",
9-
"nano": "9.0.3"
10-
},
11-
"devDependencies": {
12-
"@types/body-parser": "^1.19.1"
8+
"milliparsec": "^2.2.0",
9+
"nano": "9.0.5"
1310
},
1411
"scripts": {
1512
"start": "node index.js"

examples/csrf/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"@tinyhttp/app": "workspace:*",
77
"@tinyhttp/cookie-parser": "*",
8-
"malibu": "^1.0.3",
8+
"malibu": "^1.0.5",
99
"milliparsec": "^2.2.0"
1010
},
1111
"scripts": {

examples/deta/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"@tinyhttp/app": "workspace:*",
77
"@tinyhttp/dotenv": "workspace:*",
8-
"deta": "^1.0.0",
8+
"deta": "^1.0.1",
99
"milliparsec": "^2.2.0"
1010
}
1111
}

examples/eta/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"start": "esmo index.ts"
1010
},
1111
"devDependencies": {
12-
"esmo": "^0.9.1"
12+
"esmo": "^0.10.1"
1313
}
1414
}

examples/faunadb/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ app.get('/products', async (_, res) => {
3838
)
3939
)
4040

41-
// @ts-ignore
4241
res.send(query.data)
4342
})
4443

@@ -50,7 +49,7 @@ app.get('/product/:name', async (req, res, next) => {
5049
} else {
5150
try {
5251
const query = await client.query(q.Get(q.Match(q.Index('products_by_name'), name)))
53-
// @ts-ignore
52+
5453
res.send(query.data)
5554
} catch (e) {
5655
console.log(e)

examples/faunadb/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"@tinyhttp/app": "workspace:*",
77
"@tinyhttp/dotenv": "workspace:*",
8-
"faunadb": "^4.3.0",
8+
"faunadb": "^4.4.1",
99
"milliparsec": "^2.2.0"
1010
},
1111
"scripts": {

examples/firebase-functions/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"type": "module",
1515
"dependencies": {
1616
"@tinyhttp/app": "workspace:*",
17-
"firebase-admin": "^9.11.1",
18-
"firebase-functions": "^3.15.4"
17+
"firebase-admin": "^10.0.0",
18+
"firebase-functions": "^3.15.7"
1919
},
2020
"devDependencies": {
21-
"firebase-functions-test": "^0.3.2",
22-
"firebase-tools": "^9.16.5",
23-
"typescript": "^4.3.5"
21+
"firebase-functions-test": "^0.3.3",
22+
"firebase-tools": "^9.21.0",
23+
"typescript": "^4.4.4"
2424
},
2525
"private": true
2626
}

examples/graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"@tinyhttp/app": "workspace:*",
77
"express-graphql": "^0.12.0",
8-
"graphql": "^15.5.1"
8+
"graphql": "^15.7.2"
99
},
1010
"scripts": {
1111
"start": "node index.js"

examples/hyperapp-ssr/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "module",
55
"dependencies": {
66
"@tinyhttp/app": "workspace:*",
7-
"hyperapp": "^2.0.18",
7+
"hyperapp": "^2.0.19",
88
"hyperapp-render": "^4.0.0"
99
},
1010
"scripts": {

0 commit comments

Comments
 (0)