Skip to content

Commit

Permalink
update examples to latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasJenicek committed Oct 21, 2024
1 parent 81e4c5a commit b9d2182
Show file tree
Hide file tree
Showing 10 changed files with 3,888 additions and 18 deletions.
1 change: 1 addition & 0 deletions _examples/node-ts/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.DS_Store
.parcel-cache
4 changes: 2 additions & 2 deletions _examples/node-ts/server/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import express from 'express'
import * as proto from './server.gen'
import { createExampleServiceApp } from './server.gen'
import {createExampleServiceApp, WebrpcHeader} from './server.gen'

const app = express()

app.use((req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*')
res.setHeader('Access-Control-Allow-Methods', 'POST, GET, OPTIONS')
res.setHeader('Access-Control-Allow-Headers', 'Content-Type')
res.setHeader('Access-Control-Allow-Headers', `Content-Type, ${WebrpcHeader}`)

if (req.method === 'OPTIONS') {
res.status(200).end()
Expand Down
10 changes: 5 additions & 5 deletions _examples/node-ts/server/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "node-ts-server",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"express": "^4.16.4"
"express": "^4.21.1"
},
"devDependencies": {
"@types/express": "^4.16.1",
"ts-node": "^8.1.0",
"typescript": "^3.4.3"
"@types/express": "^4.17.21",
"@types/node": "^22.7.7",
"ts-node": "^8.10.2",
"typescript": "^3.9.10"
},
"scripts": {
"start": "./node_modules/.bin/ts-node ."
Expand Down
Loading

0 comments on commit b9d2182

Please sign in to comment.