fallback route & dep updates

This commit is contained in:
cupcakearmy 2022-03-05 12:47:11 +01:00
parent e02f7f59c6
commit d576b71bc5
No known key found for this signature in database
GPG Key ID: 3235314B4D31232F
10 changed files with 308 additions and 236 deletions

View File

@ -5,7 +5,13 @@ 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/), 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). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.4.0] - 2022-01-16 ## [1.4.1] - 2022-03-05
### Fixed
- Router in prod build.
## [1.4.0] - 2022-03-02
### Added ### Added

2
backend/Cargo.lock generated
View File

@ -398,7 +398,7 @@ dependencies = [
[[package]] [[package]]
name = "cryptgeon" name = "cryptgeon"
version = "1.4.0" version = "1.4.1"
dependencies = [ dependencies = [
"actix-files", "actix-files",
"actix-web", "actix-web",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "cryptgeon" name = "cryptgeon"
version = "1.4.0" version = "1.4.1"
authors = ["cupcakearmy <hi@nicco.io>"] authors = ["cupcakearmy <hi@nicco.io>"]
edition = "2021" edition = "2021"

View File

@ -1,5 +1,5 @@
use actix_files::Files; use actix_files::{Files, NamedFile};
use actix_web::web; use actix_web::{web, Result};
pub fn init(cfg: &mut web::ServiceConfig) { pub fn init(cfg: &mut web::ServiceConfig) {
cfg.service( cfg.service(
@ -8,3 +8,7 @@ pub fn init(cfg: &mut web::ServiceConfig) {
.use_etag(true), .use_etag(true),
); );
} }
pub async fn index() -> Result<NamedFile> {
Ok(NamedFile::open("./frontend/build/index.html")?)
}

View File

@ -1,4 +1,4 @@
use actix_web::{middleware, App, HttpServer}; use actix_web::{middleware, web, App, HttpServer};
use dotenv::dotenv; use dotenv::dotenv;
#[macro_use] #[macro_use]
@ -22,6 +22,7 @@ async fn main() -> std::io::Result<()> {
.configure(size::init) .configure(size::init)
.configure(api::init) .configure(api::init)
.configure(client::init) .configure(client::init)
.default_service(web::to(client::index))
}) })
.bind("0.0.0.0:5000")? .bind("0.0.0.0:5000")?
.run() .run()

View File

@ -11,21 +11,21 @@
"type": "module", "type": "module",
"devDependencies": { "devDependencies": {
"@lokalise/node-api": "^7.1.1", "@lokalise/node-api": "^7.1.1",
"@sveltejs/adapter-static": "^1.0.0-next.26", "@sveltejs/adapter-static": "^1.0.0-next.28",
"@sveltejs/kit": "^1.0.0-next.231", "@sveltejs/kit": "1.0.0-next.288",
"@types/file-saver": "^2.0.5", "@types/file-saver": "^2.0.5",
"adm-zip": "^0.5.9", "adm-zip": "^0.5.9",
"dotenv": "^16.0.0", "dotenv": "^16.0.0",
"svelte": "^3.46.2", "svelte": "^3.46.4",
"svelte-check": "^2.4.5", "svelte-check": "^2.4.5",
"svelte-intl-precompile": "^0.8.0", "svelte-intl-precompile": "^0.8.1",
"svelte-preprocess": "^4.10.1", "svelte-preprocess": "^4.10.4",
"tslib": "^2.3.1", "tslib": "^2.3.1",
"typescript": "^4.5.4", "typescript": "^4.6.2",
"vite": "^2.7.12" "vite": "^2.8.6"
}, },
"dependencies": { "dependencies": {
"@fontsource/fira-mono": "^4.5.0", "@fontsource/fira-mono": "^4.5.3",
"copy-to-clipboard": "^3.3.1", "copy-to-clipboard": "^3.3.1",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"pretty-bytes": "^5.6.0" "pretty-bytes": "^5.6.0"

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,6 @@
export const hydrate = dev export const hydrate = dev
export const router = browser export const router = browser
export const prerender = true
</script> </script>
<svelte:head> <svelte:head>

View File

@ -1,7 +1,3 @@
<script context="module" lang="ts">
export const prerender = true
</script>
<script lang="ts"> <script lang="ts">
import Create from '$lib/views/Create.svelte' import Create from '$lib/views/Create.svelte'
</script> </script>

View File

@ -9,7 +9,6 @@ export default {
adapter: adapter({ adapter: adapter({
fallback: 'index.html', fallback: 'index.html',
}), }),
target: '#svelte',
vite: { vite: {
plugins: [ plugins: [
precompileIntl('locales'), // if your translations are defined in /locales/[lang].json precompileIntl('locales'), // if your translations are defined in /locales/[lang].json