tangled
alpha
login
or
join now
nekomimi.pet
/
simplelink
0
fork
atom
A very performant and light (2mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres/SQLite.
0
fork
atom
overview
issues
pulls
pipelines
just use window.location
nekomimi.pet
1 year ago
abd01492
18a86af6
+3
-3
2 changed files
expand all
collapse all
unified
split
frontend
src
components
LinkList.tsx
vite.config.ts
+1
-1
frontend/src/components/LinkList.tsx
···
82
82
83
83
const handleCopy = (shortCode: string) => {
84
84
// Use import.meta.env.VITE_BASE_URL or fall back to window.location.origin
85
85
-
const baseUrl = import.meta.env.VITE_API_URL || window.location.origin
85
85
+
const baseUrl = window.location.origin
86
86
navigator.clipboard.writeText(`${baseUrl}/${shortCode}`)
87
87
toast({
88
88
description: "Link copied to clipboard",
+2
-2
frontend/vite.config.ts
···
5
5
6
6
export default defineConfig(() => ({
7
7
plugins: [react(), tailwindcss()],
8
8
-
server: {
8
8
+
/*server: {
9
9
proxy: {
10
10
'/api': {
11
11
target: process.env.VITE_API_URL || 'http://localhost:8080',
12
12
changeOrigin: true,
13
13
},
14
14
},
15
15
-
},
15
15
+
},*/
16
16
resolve: {
17
17
alias: {
18
18
"@": path.resolve(__dirname, "./src"),