diff --git a/README.md b/README.md index d379dc4..79a11c7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,39 @@ -# spongebin - - +

+ + spongebin +

a pastebin for code snippets; rendered with shiki and monaco editor + +## setup + +> [!NOTE] +> you need a [neon](https://neon.tech/) database to run this project + +1. clone the repo +2. install the dependencies + +```bash +bun install +``` + +3. create a `.env` file in the root directory and add the following variables + +```bash +DATABASE_URL="postgres://" +``` + +4. run the migrations + +```bash +bunx drizzle-kit generate +bunx drizzle-kit migrate +``` + +5. run the app + +```bash +bun dev +``` + +6. enjoy 🎉 diff --git a/src/components/monaco-editor.tsx b/src/components/monaco-editor.tsx index 6bb4255..4aac246 100644 --- a/src/components/monaco-editor.tsx +++ b/src/components/monaco-editor.tsx @@ -41,6 +41,11 @@ export function MonacoEditor() { tsx: "react", }); + monaco.languages.json.jsonDefaults.setDiagnosticsOptions({ + validate: true, + enableSchemaRequest: true, + }); + setIsLoading(false); } catch (error) { console.error("Failed to initialize editor:", error);