This is our little corner of the internet. In a shell, we us Nuxt on the front-end, Sanity as a backend, and Netlify for hosting.
Name | Link |
---|---|
Production site | dbco.online/ |
Sanity Studio | cms.dbco.online/ |
Netlify Instance | app.netlify.com/sites/dbco-frontend |
# clone repo
git clone https://github.com/egstad/nuxt.git
# install dependencies
npm install
# Run dev server (http://localhost:3000 by default):
npm run dev
# Build the application for production:
npm run build
# Locally preview production build:
npm run preview
There are a few Pinia stores we use — app
, device
, and auth
.
app
contains info related to the app's current session.device
contains device-specic info and user preferences.auth
is used for password-protected pages.
All of these stores are accessed similarly, here's an example of how to fetch a devices dpi
from the device
store:
<script setup>
// import the store
import { useDeviceStore } from "~/stores/device";
// init the store
const device = useDeviceStore();
// get screen dpi from store
const dpi = device.dpi;
</script>