Skip to content

Commit

Permalink
bug due to dep update
Browse files Browse the repository at this point in the history
  • Loading branch information
cupcakearmy committed Jan 3, 2022
1 parent a0732a4 commit bab65bc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.3] - 2022-01-03

### Fixed

- Bug fix due to dependency update.

## [1.3.2] - 2022-01-02

### Changed
Expand Down
2 changes: 1 addition & 1 deletion backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cryptgeon"
version = "1.3.2"
version = "1.3.3"
authors = ["cupcakearmy <[email protected]>"]
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/note/[id].svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script context="module" lang="ts">
export async function load({ page }) {
export async function load({ params }) {
return {
props: page.params,
props: params,
}
}
</script>
Expand Down
26 changes: 11 additions & 15 deletions proxy.mjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import http from 'http'
import httpProxy from 'http-proxy'

function start() {
try {
const proxy = httpProxy.createProxyServer({})
const server = http.createServer(function (req, res) {
const target = req.url.startsWith('/api/') ? 'http://localhost:5000' : 'http://localhost:3000'
proxy.web(req, res, { target })
})
server.listen(1234)
const proxy = httpProxy.createProxyServer()
proxy.on('error', function (err, req, res) {
res.writeHead(500, { 'Content-Type': 'text/plain' })
res.end('500 Internal Server Error')
})

server.on('error', () => start())
} catch (e) {
start()
}
}

start()
const server = http.createServer(function (req, res) {
const target = req.url.startsWith('/api/') ? 'http://localhost:5000' : 'http://localhost:3000'
proxy.web(req, res, { target })
})
server.listen(1234)
console.log('Proxy on http://localhost:1234')

0 comments on commit bab65bc

Please sign in to comment.