Finish frontend-backend split
This commit is contained in:
parent
bee972ea79
commit
48727833ca
5 changed files with 27 additions and 9 deletions
6
backend/Cargo.toml
Normal file
6
backend/Cargo.toml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[package]
|
||||||
|
name = "knotes-backend"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[dependencies]
|
3
backend/src/main.rs
Normal file
3
backend/src/main.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
16
flake.nix
16
flake.nix
|
@ -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
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "knotes-v3",
|
"name": "knotes-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -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"),
|
||||||
|
|
Loading…
Add table
Reference in a new issue