Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 image

2. Client
- switch to monorepo
- React static site generator