pageview
Add this snippet to your website:
<script>
!(function (e, n, t) {
e.onload = function () {
let e = n.createElement('script')
;(e.src = t), n.body.appendChild(e)
}
})(window, document, 'https://pageview.duyet.net/pageview.js')
</script>
Checkout result at: https://pageview.duyet.net
Development
To run the development server, execute the following command:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
Contribute and deployment
To contribute to the project, push any changes to the dev
branch and create a PR to merge the changes into the main
branch.
Preview deployment can be seen on the dev
branch.
For deployment on Vercel, follow these links for instructions:
- https://www.prisma.io/docs/guides/database/using-prisma-with-planetscale
- Next.js deployment documentation.
Project note
Disclaimer: This project is not intended for scale and is for personal usage only. I may consider scaling it later on. The main purpose of this project is to demonstrate how to use Next.js, PlanetScale, TurboRepo, Vercel and some modern React components.
License
MIT.