shortener-web-v
April 28, 2022 ยท View on GitHub
Backend for a simple url shortener and plaintext + temporary binary store using vweb and Redis. Frontend is created using typescript and built using vite.
Shortener website here! (s.l-m.dev)
Requires
- V install
- NPM
- Redis with default configuration
Compiling and running your own instance
Inside the main directory...
Running the project for development
fuser -k 8080/tcp # kill process on 8080 port
v watch --add "templates/" run .
Build simple binary
v up
sudo systemctl enable redis
cd public
npm install
cd ..
# correct setup of all deps
# npm deps for build
# v updates
# enable redis
./build/build-all.sh
# this will build the vite project
# then build the v binary after moving the correct files
./shortener-web-app
Build tar.gz package
# install deps ....
./build/package.sh
# creates shortener-all.tar.gz