Commit Graph

11 Commits

Author SHA1 Message Date
a6598ba5db clicks are deleted when connected links are
fixes #7
2021-04-01 10:00:16 +02:00
2fba9080d6 Revert "format migration"
as migrations store a hash it is not possible to change the
migrationfiles afterwards.

This reverts commit fdcc89ec1f.
2021-04-01 10:00:16 +02:00
fdcc89ec1f
format migration 2021-03-31 16:40:25 +02:00
218840432f
initial translatability 2021-03-30 13:18:13 +02:00
a4d5982e3c
make initial migrations work (no db file exists). 2021-03-21 13:02:55 +01:00
e8ff696006
working sqlx-port 2021-03-21 08:31:47 +01:00
9512807eb3
Add command line interface
Add a command line interface to the binary and remove parts
that were hardcoded.

new --help is:

```
pslink 0.1.0
Dietrich <dietrich@teilgedanken.de>
A simple webservice that allows registered users to create short links including qr-codes.
Anyone can visit the shortened links. This is an ideal setup for small busines or for publishing papers.

USAGE:
    pslink [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --db <database>              The path of the sqlite database [env: PSLINK_DATABASE=]  [default: links.db]
    -i, --hostip <internal_ip>       The host (ip) that will run the pslink service [env: PSLINK_IP=]  [default:
                                     localhost]
    -p, --port <port>                The port the pslink service will run on [env: PSLINK_PORT=]  [default: 8080]
    -t, --protocol <protocol>        The protocol that is used in the qr-codes (http results in slightly smaller codes
                                     in some cases) [env: PSLINK_PROTOCOL=]  [default: http]  [possible values: http,
                                     https]
    -u, --public-url <public_url>    The host url or the page that will be part of the short urls. [env:
                                     PSLINK_PUBLIC_URL=]  [default: localhost:8080]
        --secret <secret>            The secret that is used to encrypt the password database keep this as inacessable
                                     as possible. As commandlineparameters are visible to all users it is not wise to
                                     use this as a commandline parameter but rather as an environment variable. [env:
                                     PSLINK_SECRET=]  [default: ]

SUBCOMMANDS:
    runserver           Run the server
    create-admin        Create an admin user.
    generate-env        Generate an .env file template using default settings and exit
    migrate-database    Apply any pending migrations and exit
    help                Prints this message or the help of the given subcommand(s)
```
2021-03-07 19:14:34 +01:00
0553aaa935
Add permissions to the page 2021-02-14 22:28:34 +01:00
72be8e693a
migrations for user roles 2021-02-10 09:12:42 +01:00
d3465b4e10
Adding click statistics
closes #2
2021-02-09 21:30:11 +01:00
d64f205162
initial commit of slink 2021-02-04 15:07:55 +01:00