Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnaudrinquin/ushortner
UShort - URL shortening service
https://github.com/arnaudrinquin/ushortner
Last synced: 21 days ago
JSON representation
UShort - URL shortening service
- Host: GitHub
- URL: https://github.com/arnaudrinquin/ushortner
- Owner: ArnaudRinquin
- Created: 2023-09-05T18:35:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-05T21:02:44.000Z (over 1 year ago)
- Last Synced: 2024-10-18T19:43:33.851Z (3 months ago)
- Language: TypeScript
- Size: 93.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UShort - URL shortening service
This project has no other purpose than having fun coding.
## How to?
Classic nodejs project commands:
```sh
npm install
npm build
npm start
# or
npm install
npm dev
```It will connect to a local PostGres DB (check details in ./src/services/db.ts) - TODO: make configurable
You can run one with `docker-compose up`
You must create a redirections table - see migrate_db.sql
## URLs
### POST /redirections {url, slug}
`curl -X POST -H "Content-Type: application/json" -d '{"slug": "curl", "url": "https://curl.se/"}' http://127.0.0.1:3000/redirections`
### /:slug
## Project steps
1. MVP
- CRUD + redirect API only
- nodejs + typescript
- fastify
- postgres DB
- DX: simple testing, dev mode, docker image2. Client
- switch to monorepo
- React static site generator