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/),
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

2
backend/Cargo.lock generated
View File

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

View File

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

View File

@ -1,5 +1,5 @@
use actix_files::Files;
use actix_web::web;
use actix_files::{Files, NamedFile};
use actix_web::{web, Result};
pub fn init(cfg: &mut web::ServiceConfig) {
cfg.service(
@ -8,3 +8,7 @@ pub fn init(cfg: &mut web::ServiceConfig) {
.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;
#[macro_use]
@ -22,6 +22,7 @@ async fn main() -> std::io::Result<()> {
.configure(size::init)
.configure(api::init)
.configure(client::init)
.default_service(web::to(client::index))
})
.bind("0.0.0.0:5000")?
.run()

View File

@ -11,21 +11,21 @@
"type": "module",
"devDependencies": {
"@lokalise/node-api": "^7.1.1",
"@sveltejs/adapter-static": "^1.0.0-next.26",
"@sveltejs/kit": "^1.0.0-next.231",
"@sveltejs/adapter-static": "^1.0.0-next.28",
"@sveltejs/kit": "1.0.0-next.288",
"@types/file-saver": "^2.0.5",
"adm-zip": "^0.5.9",
"dotenv": "^16.0.0",
"svelte": "^3.46.2",
"svelte": "^3.46.4",
"svelte-check": "^2.4.5",
"svelte-intl-precompile": "^0.8.0",
"svelte-preprocess": "^4.10.1",
"svelte-intl-precompile": "^0.8.1",
"svelte-preprocess": "^4.10.4",
"tslib": "^2.3.1",
"typescript": "^4.5.4",
"vite": "^2.7.12"
"typescript": "^4.6.2",
"vite": "^2.8.6"
},
"dependencies": {
"@fontsource/fira-mono": "^4.5.0",
"@fontsource/fira-mono": "^4.5.3",
"copy-to-clipboard": "^3.3.1",
"file-saver": "^2.0.5",
"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 router = browser
export const prerender = true
</script>
<svelte:head>

View File

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

View File

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