A URL shortener using Next.js 14 server actions, Postgres or SurrealDB, Shadcn/ui, and Tailwind.
Find a file
2024-02-19 11:44:10 -08:00
.devcontainer init 2024-02-15 13:23:35 -08:00
.github/workflows github actions docker 2024-02-19 11:44:10 -08:00
src postgres 2024-02-19 10:41:47 -08:00
.dockerignore fix nav 2024-02-19 03:39:57 -08:00
.eslintrc.json init 2024-02-15 13:23:35 -08:00
.gitignore init 2024-02-15 13:23:35 -08:00
.prettierignore init 2024-02-15 13:23:35 -08:00
components.json init 2024-02-15 13:23:35 -08:00
CONTRIBUTING.md init 2024-02-15 13:23:35 -08:00
docker-compose-postgres.dev.yml github actions docker 2024-02-19 11:44:10 -08:00
docker-compose-postgres.yml github actions docker 2024-02-19 11:44:10 -08:00
docker-compose-surrealdb.dev.yml postgres 2024-02-19 10:41:47 -08:00
docker-compose-surrealdb.yml github actions docker 2024-02-19 11:44:10 -08:00
Dockerfile fix nav 2024-02-19 03:39:57 -08:00
LICENSE-Apache init 2024-02-15 13:23:35 -08:00
LICENSE-MIT init 2024-02-15 13:23:35 -08:00
next.config.js fix redirect 2024-02-16 03:32:32 -08:00
package-lock.json postgres 2024-02-19 10:41:47 -08:00
package.json postgres 2024-02-19 10:41:47 -08:00
postcss.config.js init 2024-02-15 13:23:35 -08:00
README.md postgres 2024-02-19 10:41:47 -08:00
shell.nix init 2024-02-15 13:23:35 -08:00
tailwind.config.ts init 2024-02-15 13:23:35 -08:00
tsconfig.json broken 2024-02-17 18:28:17 -08:00

next-url-shortener

A simple URL shortener using Next.js 14 server actions, Postgres or SurrealDB, Shadcn/ui and Tailwind.

Install

Copy one

Create data folder next to docker-compose.yml and .env, and set the data type in .env

├── data
│   └── surrealdb
├── docker-compose-postgres.yml
└── .env

Then run:

  • docker compose -f docker-compose-postgres.yml up --pull always -d
  • docker compose -f docker-compose-surrealdb.yml up --pull always -d

Example .env

# postgres or surrealdb
DB_TYPE=postgres

# For surrealdb: If using docker surrealdb:8000, if not use 0.0.0.0:8000
# For postgres: If using docker postgres:5432, if not use 0.0.0.0:5432
DB_URL_PORT=postgres:5432

# postgres
POSTGRES_USER=root
POSTGRES_PASSWORD=root
POSTGRES_DB=url

# surrealdb 
DB_USER=root
DB_PASSWORD=root

License

All code in this repository is dual-licensed under either License-MIT or LICENSE-APACHE at your option. This means you can select the license you prefer. Why dual license