Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use memory serve for files #59

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dotenvy = "0.15.7"
geoutils = "0.5.1"
regex = "1.10.4"
chrono = "0.4.38"
memory-serve = "0.4.5"

[profile.release]
codegen-units = 1
Expand Down
2 changes: 1 addition & 1 deletion frontend/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sveio - Page Not Found</title>
<link rel="stylesheet" href="/static/ui.css" />
<link rel="stylesheet" href="/ui.css" />
</head>
<body>
<main class="flex flex-center flex-col">
Expand Down
6 changes: 3 additions & 3 deletions frontend/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""
/>
<link rel="stylesheet" href="/static/game.css" />
<link rel="stylesheet" href="/static/ui.css" />
<link rel="stylesheet" href="/game.css" />
<link rel="stylesheet" href="/ui.css" />
<title>Sveio - In-game</title>
</head>
<body>
Expand All @@ -42,6 +42,6 @@
crossorigin=""
></script>
<script src="https://cdn.socket.io/4.7.3/socket.io.min.js"></script>
<script defer src="/static/game.js"></script>
<script defer src="/game.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions frontend/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ let targetAnnounced = false;

function createMarkerIcon(color) {
return L.icon({
iconUrl: "/static/assets/marker-icon-" + color + ".png",
shadowUrl: "/static/assets/marker-shadow.png",
iconUrl: "/assets/marker-icon-" + color + ".png",
shadowUrl: "/assets/marker-shadow.png",
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
Expand Down
2 changes: 1 addition & 1 deletion frontend/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="/static/ui.css" />
<link rel="stylesheet" href="/ui.css" />
<style>
h2 {
margin: 0;
Expand Down
7 changes: 6 additions & 1 deletion frontend/robots.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
User-agent: *
Disallow: /static
Disallow: /assets
Disallow: /game.html
Disallow: /game.css
Disallow: /game.js
Disallow: /game
Disallow: /404.html
Disallow: /404

User-agent: ChatGPT-User
Disallow: /
Expand Down
Loading
Loading