This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
131 additions
and
40 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { WARN, createLogger, stdSerializers } from 'bunyan'; | ||
|
||
const transactionSerializer = transaction => { | ||
if (!transaction?.status) return transaction; | ||
|
||
return { | ||
successful: transaction.status, | ||
transactionHash: transaction.transactionHash, | ||
from: transaction.from, | ||
to: transaction.to, | ||
gas: transaction.gasUsed | ||
}; | ||
}; | ||
|
||
const svelteRequestEventSerializer = event => { | ||
if (!event?.request) return event; | ||
|
||
const headers = Object.fromEntries(event.request.headers); | ||
delete headers.cookie; | ||
|
||
return { | ||
method: event.request.method, | ||
url: event.url, | ||
headers, | ||
remoteAddress: event.getClientAddress(), | ||
platform: event.platform, | ||
id: crypto.randomUUID() | ||
}; | ||
}; | ||
|
||
export const log = createLogger({ | ||
name: 'main-server', | ||
streams: [ | ||
{ | ||
type: 'rotating-file', | ||
path: '/var/log/auto-trading/main-server.log', | ||
period: '1d', | ||
count: 7 | ||
}, | ||
{ | ||
stream: process.stdout | ||
}, | ||
{ | ||
stream: process.stderr, | ||
level: WARN | ||
} | ||
], | ||
serializers: { | ||
transaction: transactionSerializer, | ||
request: svelteRequestEventSerializer, | ||
error: stdSerializers.err | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,32 @@ | ||
<main class="p-0 text-2xl overflow-visible" > | ||
<div class="header absolute flex gap-3 items-center w-screen h-25 p-6 pl-64 pr-64 bg-section-300"> | ||
<img src="/notfound.png" class="h-16 rounded-md" alt="logo"> | ||
<p class="">auto-trader</p> | ||
<span class="subtext">/</span> | ||
<a href="/identity" class="text-xl transition-all underline-offset-3 decoration-white/30 hover:decoration-white underline hover:underline-offset-[6px]">sign-in</a> | ||
<a href="/dashboard" class="text-xl transition-all underline-offset-3 decoration-white/30 hover:decoration-white underline hover:underline-offset-[6px]">dashboard</a> | ||
</div> | ||
<main class="overflow-visible p-0 text-2xl"> | ||
<div class="header h-25 absolute flex w-screen items-center gap-3 bg-section-300 p-6 pl-64 pr-64"> | ||
<img src="/notfound.png" class="h-16 rounded-md" alt="logo" /> | ||
<p class="">auto-trader</p> | ||
<span class="subtext">/</span> | ||
<!-- eslint-disable max-len --> | ||
<a | ||
href="/identity" | ||
class="underline-offset-3 text-xl underline decoration-white/30 transition-all hover:decoration-white hover:underline-offset-[6px]" | ||
>sign-in</a | ||
> | ||
<a | ||
href="/dashboard" | ||
class="underline-offset-3 text-xl underline decoration-white/30 transition-all hover:decoration-white hover:underline-offset-[6px]" | ||
>dashboard</a | ||
> | ||
<!-- eslint-enable max-len --> | ||
</div> | ||
|
||
<div class="flex w-screen h-screen justify-center items-center gap-3"> | ||
<div class="w-1/4"> | ||
<h1 class="text-6xl">lorem ipsum</h1> | ||
<p class="subtext mt-4">dolor sit amet consectetur adipisicing elit. Explicabo corrupti, quibusdam laudantium sit, fugit nisi quae provident porro id laborum voluptatem perspiciatis praesentium, perferendis vero! Quo voluptas quod et ipsam.</p> | ||
</div> | ||
<img src="dashboard.webp" alt="dashboard" class="w-1/2 rounded-2xl"> | ||
</div> | ||
</main> | ||
<div class="flex h-screen w-screen items-center justify-center gap-3"> | ||
<div class="w-1/4"> | ||
<h1 class="text-6xl">lorem ipsum</h1> | ||
<!-- eslint-disable-next-line max-len --> | ||
<p class="subtext mt-4"> | ||
dolor sit amet consectetur adipisicing elit. Explicabo corrupti, quibusdam laudantium sit, | ||
fugit nisi quae provident porro id laborum voluptatem perspiciatis praesentium, perferendis | ||
vero! Quo voluptas quod et ipsam. | ||
</p> | ||
</div> | ||
<img src="dashboard.webp" alt="dashboard" class="w-1/2 rounded-2xl" /> | ||
</div> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters