Finish frontend-backend split

This commit is contained in:
kalle 2025-03-19 20:48:12 +01:00
parent bee972ea79
commit 48727833ca
5 changed files with 27 additions and 9 deletions

6
backend/Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "knotes-backend"
version = "0.1.0"
edition = "2021"
[dependencies]

3
backend/src/main.rs Normal file
View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

View file

@ -40,6 +40,8 @@
{ {
dotenv.disableHint = true; dotenv.disableHint = true;
languages.rust.enable = true;
packages = with pkgs; [ packages = with pkgs; [
nodejs nodejs
@ -55,6 +57,20 @@
# ySweet.exec = "pnpm dlx y-sweet@latest serve data"; # ySweet.exec = "pnpm dlx y-sweet@latest serve data";
}; };
services.caddy = {
enable = true;
config = ''
{
http_port 8000
https_port 8443
}
192.168.10.200 {
reverse_proxy localhost:9000
}
'';
};
enterShell = '' enterShell = ''
devenv up -D devenv up -D
''; '';

View file

@ -1,5 +1,5 @@
{ {
"name": "knotes-v3", "name": "knotes-frontend",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
@ -67,4 +67,4 @@
"esbuild" "esbuild"
] ]
} }
} }

View file

@ -22,13 +22,6 @@ export default defineConfig({
maximumFileSizeToCacheInBytes: 512 * 1024 * 1024, maximumFileSizeToCacheInBytes: 512 * 1024 * 1024,
}), }),
], ],
server: {
host: true,
https: {
key: "certificates/cert.key",
cert: "certificates/cert.crt",
},
},
resolve: { resolve: {
alias: { alias: {
"~": path.resolve(__dirname, "./src"), "~": path.resolve(__dirname, "./src"),