Giter VIP home page Giter VIP logo

deno-url-shortener's Introduction

Deno URL Shortener

Made with Fresh

This is a simple URL Shortener built to learn Deno & Fresh framework.

How to run

Prerequisite

  • 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.

My opinions

What I like about Deno/Fresh

  • 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

What I don't like about Deno/Fresh

  • 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)

Things I wish Deno/Fresh do

Conclusion

  • 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.