This is a simple URL Shortener built to learn Deno & Fresh framework.
- Provision CockroachDB Serverless instance
- Create Github Oauth application
- Create
.env
file with the following content
DATABASE_URL="postgresql://sdil:[email protected]:26257/defaultdb?sslmode=verify-full&options=--cluster%3Dxxx"
GITHUB_CLIENT_ID="xxx"
GITHUB_CLIENT_SECRET="xxx"
GITHUB_CALLBACK_URL="http://localhost:8000/api/github_callback"
Run DB migrations
migrate -database $COCKROACH_DB_URL -path db/migrations/ up
Start the project:
deno task start
This will watch the project directory and restart as necessary.
- Super fast: Deno backend can handle thousands of requests per second; Preact is super fast but I don't know how to measure this
- Configuration is super easy, there's no tsconfig files, package.json, prettier, etc.
- Deno tooling looks similar to Go's where it can immediately format and lint the files without 3rd party packages
- The upgrade path is quite smooth as the Fresh team provides a script to update the relevant files
- It's still early so the resources are still scarce
- Ecosystem support is still weak. I really wish UI components/libraries like Chakra UI, Bulma, etc. are supported (hopefully they will soon since they just released a plugin module)
- I would probably use Deno & Fresh in the future to build website with a lot of contents because of its performance. It's however in my opinion, not suitable for interactive web app, which is should be done using NextJS or Remix.