mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
docs: correct dev docs
This commit is contained in:
@@ -19,7 +19,7 @@ npm install
|
|||||||
|
|
||||||
### Environment Configuration
|
### Environment Configuration
|
||||||
|
|
||||||
The application requires an environment variable to point to the backend API. Create a `.env` file in this directory or set the variable in your environment:
|
The frontend requires an environment variable to point to the backend API. Create a `.env` file in this directory or set the variable in your environment:
|
||||||
|
|
||||||
- `VITE_API_URL`: The URL of the backend API (e.g., `http://localhost:8080`).
|
- `VITE_API_URL`: The URL of the backend API (e.g., `http://localhost:8080`).
|
||||||
- `VITE_ALLOWED_HOSTS`: A comma separated list of allowed hosts (e.g., `localhost,sharpbin.whoswhip.dev`)
|
- `VITE_ALLOWED_HOSTS`: A comma separated list of allowed hosts (e.g., `localhost,sharpbin.whoswhip.dev`)
|
||||||
@@ -33,21 +33,13 @@ Start the development server with Hot Module Replacement (HMR):
|
|||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
The application will be available at http://localhost:5173.
|
The frontend will be available at http://localhost:5173.
|
||||||
|
|
||||||
## Script Reference
|
## Script Reference
|
||||||
|
|
||||||
- `npm run dev`: Start the Vite development server.
|
- `npm run dev`: Start the Vite development server.
|
||||||
- `npm run build`: Create a production build of the application.
|
- `npm run build`: Create a production build of the frontend.
|
||||||
- `npm run preview`: Locally preview the production build.
|
- `npm run preview`: Locally preview the production build.
|
||||||
- `npm run check`: Run type checking with svelte-check.
|
- `npm run check`: Run type checking with svelte-check.
|
||||||
- `npm run lint`: Run ESLint and Prettier checks.
|
- `npm run lint`: Run ESLint and Prettier checks.
|
||||||
- `npm run format`: Format the codebase with Prettier.
|
- `npm run format`: Format the codebase with Prettier.
|
||||||
|
|
||||||
## Tech Stack
|
|
||||||
|
|
||||||
- Svelte 5 with SvelteKit.
|
|
||||||
- Tailwind CSS for styling.
|
|
||||||
- Lucide Svelte for icons.
|
|
||||||
- Highlight.js for syntax highlighting.
|
|
||||||
- TypeScript for type safety.
|
|
||||||
@@ -15,15 +15,6 @@ The server configuration is managed in `appsettings.json`. For development, ensu
|
|||||||
|
|
||||||
- `ConnectionStrings__DefaultConnection`: SQLite connection string (e.g., `Data Source=/app/data/sharpbin.db`).
|
- `ConnectionStrings__DefaultConnection`: SQLite connection string (e.g., `Data Source=/app/data/sharpbin.db`).
|
||||||
- `JwtSettings__Secret`: A secure string used for signing JWT tokens.
|
- `JwtSettings__Secret`: A secure string used for signing JWT tokens.
|
||||||
- `AuthSettings__CF_Turnstile_SecretKey`: Your Cloudflare Turnstile secret key.
|
|
||||||
- `AuthSettings__CF_Turnstile_SiteKey`: Your Cloudflare Turnstile site key.
|
|
||||||
- `AuthSettings__Registration_Enabled`: Set to `true` by default, enables/disables registration.
|
|
||||||
- `AuthSettings__First_User_Admin`: Gives the first user the admin role, it is recommended to disable this after use.
|
|
||||||
- `AuthSettings__Admins_Require_2FA`: Enforces Admins to have 2FA when trying to do certain actions.
|
|
||||||
- `PasteSettings__MaxTitleLength`: Max title length in characters.
|
|
||||||
- `PasteSettings__MaxPasteSizeInBytes`: Max Paste Size set in bytes, the default is `1_048_576` (1MB)
|
|
||||||
- `PasteSettings__EnablePasteCompression`: Enables/Disables server-side paste compression, `true` by default.
|
|
||||||
- `PasteSettings__RequiresVerification`: Enables/Disables CAPTCHA verification when creating pastes, `true` by default.
|
|
||||||
- `PasteSettings__View_HMAC_Secret`: Required to securely hash viewer identifiers
|
- `PasteSettings__View_HMAC_Secret`: Required to securely hash viewer identifiers
|
||||||
- `PasteSettings__View_Internal_API_Key`: Enforces views to be counted/recorded only by the frontend, if set it needs to be the same for both backend and frontend.
|
- `PasteSettings__View_Internal_API_Key`: Enforces views to be counted/recorded only by the frontend, if set it needs to be the same for both backend and frontend.
|
||||||
|
|
||||||
@@ -43,13 +34,4 @@ Use the following command to run the server with hot reload:
|
|||||||
dotnet watch run
|
dotnet watch run
|
||||||
```
|
```
|
||||||
|
|
||||||
The API will be accessible at http://localhost:8080 by default (check `Properties/launchSettings.json` or your specific configuration).
|
The API will be accessible at http://localhost:5050 by default (check `Properties/launchSettings.json` or your specific configuration).
|
||||||
|
|
||||||
## Tech Stack
|
|
||||||
|
|
||||||
- ASP.NET Core (Web API)
|
|
||||||
- Entity Framework Core with SQLite
|
|
||||||
- JWT Authentication
|
|
||||||
- BCrypt for password hashing
|
|
||||||
- Health Checks for monitoring
|
|
||||||
- Swagger/OpenAPI for documentation
|
|
||||||
Reference in New Issue
Block a user