My pet project that shortens long links ;)
Back-end: go-ushort
Design: figma
https://very-long-site-subdomain.long-domain-ffff.com/my-best-blog
-> https://ushort.us/7R
- Layout
- Authorization (next-auth with refresh token)
- Configure interceptors for axios
- Add pages for CRUD operations with links
- Add Dockerfile
- Configure deploy (vercel)
- Add CI-CD pipeline (in progress)
- Write tests
yarn dev
# Run nextjs app in development mode
yarn build
# build for production
docker build . \
--platform=linux/amd64 \
-t frontend-ushort \
--build-arg NEXT_PUBLIC_BACKEND_URL="https://ushort.us"
# build for amd64
docker build . \
-t frontend-ushort \
--build-arg NEXT_PUBLIC_BACKEND_URL="https://ushort.us"
# build docker image
docker run -d --rm -p 80:3000 \
--name frontend-ushort \
-e NEXTAUTH_SECRET="test-secret" \
-e NEXTAUTH_URL="http://localhost" frontend-ushort
# run docker container
param | type | required | default | description |
---|---|---|---|---|
NEXT_PUBLIC_BACKEND_URL |
string |
yes |
- |
Backend (go-ushort) url (ex.: "https://ushort.us") |
param | type | required | default | description |
---|---|---|---|---|
NEXTAUTH_SECRET |
string |
yes |
- |
Secret for generating session-token |
NEXTAUTH_URL |
string |
yes |
- |
Base front-end url (ex.: "http://localhost") |
NEXT_PUBLIC_BACKEND_URL |
string |
yes |
- |
Backend (go-ushort) url (ex.: "https://ushort.us") |