kkga / ter

A tiny wiki-style site generator with Zettelkasten flavor.
https://ter.kkga.me
MIT License
96 stars 6 forks source link

fix: adds 404 page #29

Closed marlalain closed 1 year ago

marlalain commented 2 years ago

Fixes #21.

Tried to follow project's coding standards. Comment if anything is missing.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ter ✅ Ready (Inspect) Visit Preview Oct 23, 2022 at 8:12AM (UTC)
kkga commented 2 years ago

As the preview deployment shows, this doesn't actually work :D https://ter-git-fork-minsk-dev-feat-404-kkga.vercel.app/not-found

The server in serve.ts only works when running in local dev.

vercel[bot] commented 2 years ago

Someone is attempting to deploy a commit to a Personal Account owned by @kkga on Vercel.

@kkga first needs to authorize it.

marlalain commented 2 years ago

@kkga That not from the code. Every provider is going to handle 404's differently, and Vercel has their own page for these situations. This is something that can be changed by updating {root}/vercel.json, but it's going to depend on what host provider you are using. I think it may help to take a look at their docs :) I created my own vercel configuration and am successfully handling 404's at https://ter-phnqcrpsm-minsk.vercel.app/fjisafjiajfa. In case you are interested.

It's good to understand each part of development to understand where errors are coming from. This can take hours away from you. Trying to 'debug' trpc when your error is from react-query, etc... Happens a lot.