1 line
8.1 KiB
JSON
1 line
8.1 KiB
JSON
{"_path":"/getting-started/configuration","_dir":"getting-started","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"Configuration","description":"Configure Nuxt Mongoose with the mongoose property.","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"configuration"},"children":[{"type":"text","value":"Configuration"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Configure Nuxt Mongoose with the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mongoose"}]},{"type":"text","value":" property."}]},{"type":"element","tag":"code","props":{"className":["language-ts"],"code":"export default defineNuxtConfig({\n mongoose: {\n uri: 'process.env.MONGODB_URI',\n options: {},\n modelsDir: 'models',\n devtools: true,\n },\n})\n","filename":"nuxt.config","language":"ts","meta":""},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"class":"ct-942366"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-443230"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-942366"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-443230"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-923966"},"children":[{"type":"text","value":"defineNuxtConfig"}]},{"type":"element","tag":"span","props":{"class":"ct-443230"},"children":[{"type":"text","value":"({\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"class":"ct-443230"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-935781"},"children":[{"type":"text","value":"mongoose: {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"class":"ct-935781"},"children":[{"type":"text","value":" uri: "}]},{"type":"element","tag":"span","props":{"class":"ct-667011"},"children":[{"type":"text","value":"'process.env.MONGODB_URI'"}]},{"type":"element","tag":"span","props":{"class":"ct-935781"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"class":"ct-935781"},"children":[{"type":"text","value":" options: {},\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"class":"ct-935781"},"children":[{"type":"text","value":" modelsDir: "}]},{"type":"element","tag":"span","props":{"class":"ct-667011"},"children":[{"type":"text","value":"'models'"}]},{"type":"element","tag":"span","props":{"class":"ct-935781"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"class":"ct-935781"},"children":[{"type":"text","value":" devtools: "}]},{"type":"element","tag":"span","props":{"class":"ct-998471"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-935781"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"class":"ct-935781"},"children":[{"type":"text","value":" }"}]},{"type":"element","tag":"span","props":{"class":"ct-443230"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"class":"ct-443230"},"children":[{"type":"text","value":"})"}]}]}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Key"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Type"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Default"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"uri"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"string"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"process.env.MONGODB_URI"}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"Connection Uri String"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"options"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ConnectOptions"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"{ }"}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"Connection Options"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"modelsDir"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"string"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"models"}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"The models(schema) directory located in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"server"}]},{"type":"text","value":" for auto-import"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"devtools"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"boolean"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"Enable Mongoose module in "},{"type":"element","tag":"a","props":{"href":"https://github.com/nuxt/devtools","rel":["nofollow"]},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nuxt Devtools"}]}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".dark .ct-942366{color:#FF7B72;}\n.ct-942366{color:#CF222E;}\n.dark .ct-443230{color:#FFA657;}\n.ct-443230{color:#953800;}\n.dark .ct-923966{color:#D2A8FF;}\n.ct-923966{color:#8250DF;}\n.dark .ct-935781{color:#C9D1D9;}\n.ct-935781{color:#24292F;}\n.dark .ct-667011{color:#A5D6FF;}\n.ct-667011{color:#0A3069;}\n.dark .ct-998471{color:#79C0FF;}\n.ct-998471{color:#0550AE;}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:1.getting-started:3.configuration.md","_source":"content","_file":"1.getting-started/3.configuration.md","_extension":"md"} |