sce url shortening service
- setup sce-cli using the steps here https://github.com/SCE-Development/SCE-CLI
- clone the project with
sce clone z
- link the project to the tool
cd PATH_TO_CLEEZY_HERE
sce link z
- run the project
sce run z
- ensure the server is running locally at
http://localhost:8000
send HTTP POST request to http://localhost:8000/create_url with body
{
"alias": "myurl",
"url": "https://sce.sjsu.edu/"
}
Open http://localhost:8000/find/myurl in the browser
Open http://localhost:8000/list in the browser
- send HTTP POST request to http://localhost:8000/delete/myurl
- verify the url was deleted by opening http://localhost:8000/list in the browser
If you have an existing database and want to add a column, see below
docker exec -it cleezy-app /bin/bash
apt update
apt install -y sqlite3
# for example adding a new expires_at column
ALTER TABLE urls
ADD COLUMN expires_at DATETIME DEFAULT NULL;