Init
This commit is contained in:
commit
cb49ba0e8d
1
backend/.gitignore
vendored
Normal file
1
backend/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/target
|
1597
backend/Cargo.lock
generated
Normal file
1597
backend/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
8
backend/Cargo.toml
Normal file
8
backend/Cargo.toml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[package]
|
||||||
|
name = "backend"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
rocket = "0.5.1"
|
||||||
|
|
12
backend/src/main.rs
Normal file
12
backend/src/main.rs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#[macro_use]
|
||||||
|
extern crate rocket;
|
||||||
|
|
||||||
|
#[get("/")]
|
||||||
|
fn index() -> &'static str {
|
||||||
|
"Hello, world!"
|
||||||
|
}
|
||||||
|
|
||||||
|
#[launch]
|
||||||
|
fn rocket() -> _ {
|
||||||
|
rocket::build().mount("/", routes![index])
|
||||||
|
}
|
2
frontend/.gitignore
vendored
Normal file
2
frontend/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
node_modules
|
||||||
|
dist
|
13
frontend/README.md
Normal file
13
frontend/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Reezer
|
||||||
|
|
||||||
|
Yet another rewrite of deemix, this time with:
|
||||||
|
|
||||||
|
- Rust in the backend
|
||||||
|
- Rocket.rs as server
|
||||||
|
- Swagger API docs
|
||||||
|
- Solidjs in the frontend
|
||||||
|
- SPA mode
|
||||||
|
- Bun
|
||||||
|
- UnoCSS
|
||||||
|
- Docker
|
||||||
|
|
BIN
frontend/bun.lockb
Executable file
BIN
frontend/bun.lockb
Executable file
Binary file not shown.
16
frontend/index.html
Normal file
16
frontend/index.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#000000" />
|
||||||
|
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
|
||||||
|
<title>Solid App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
|
||||||
|
<script src="/src/index.tsx" type="module"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
23
frontend/package.json
Normal file
23
frontend/package.json
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "vite-template-solid",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"start": "vite",
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vite build",
|
||||||
|
"serve": "vite preview"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"@unocss/preset-wind": "^0.65.3",
|
||||||
|
"typescript": "^5.7.2",
|
||||||
|
"unocss": "^0.65.3",
|
||||||
|
"vite": "^6.0.0",
|
||||||
|
"vite-plugin-solid": "^2.11.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"solid-js": "^1.9.3"
|
||||||
|
}
|
||||||
|
}
|
22
frontend/src/App.tsx
Normal file
22
frontend/src/App.tsx
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import type { Component } from 'solid-js';
|
||||||
|
|
||||||
|
const App: Component = () => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<header>
|
||||||
|
<p>
|
||||||
|
Edit <code class="font-bold text-xs">src/App.tsx</code> and save to reload.
|
||||||
|
</p>
|
||||||
|
<a
|
||||||
|
href="https://github.com/solidjs/solid"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Learn Solid
|
||||||
|
</a>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default App;
|
BIN
frontend/src/assets/favicon.ico
Normal file
BIN
frontend/src/assets/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
15
frontend/src/index.tsx
Normal file
15
frontend/src/index.tsx
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/* @refresh reload */
|
||||||
|
import { render } from 'solid-js/web';
|
||||||
|
|
||||||
|
import 'virtual:uno.css'
|
||||||
|
import App from './App';
|
||||||
|
|
||||||
|
const root = document.getElementById('root');
|
||||||
|
|
||||||
|
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
||||||
|
throw new Error(
|
||||||
|
'Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
render(() => <App />, root!);
|
15
frontend/tsconfig.json
Normal file
15
frontend/tsconfig.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"strict": true,
|
||||||
|
"target": "ESNext",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"jsxImportSource": "solid-js",
|
||||||
|
"types": ["vite/client"],
|
||||||
|
"noEmit": true,
|
||||||
|
"isolatedModules": true
|
||||||
|
}
|
||||||
|
}
|
9
frontend/uno.config.ts
Normal file
9
frontend/uno.config.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import presetWind from '@unocss/preset-wind'
|
||||||
|
import { defineConfig } from 'unocss'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
// ...UnoCSS options
|
||||||
|
presets: [
|
||||||
|
presetWind(),
|
||||||
|
]
|
||||||
|
})
|
16
frontend/vite.config.ts
Normal file
16
frontend/vite.config.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import UnoCSS from 'unocss/vite'
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
import solidPlugin from 'vite-plugin-solid';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
solidPlugin(),
|
||||||
|
UnoCSS(),
|
||||||
|
],
|
||||||
|
server: {
|
||||||
|
port: 3000,
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
target: 'esnext',
|
||||||
|
},
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user