Rebuilt of the concept of fiche running as termbin.com.
The goal of the project for its first version is that the service can receive data via tcp and serve that data over http.
nc *.*.*.* 1337
-> id of post
- GET / -> description website
- GET /{slug} -> post
- GET /{=! slug} -> 404
- GET /{slug}/stats -> return [timestamp, views, size]
- user sends post via tcp
echo test data | nc server 1337
- server reveives data on port 1337
- server generates id and timestamp for post
- server saves data to database
- {post, gen_id, timestamp}
- server returns url with gen_id to user
http://server/gen_id
- user sends http GET request with gen_id
curl http://server/gen_id
- server checks if gen_id is in database -> else return 404
- server looks up gen_id in database
- server returns post