secret warning + toc
This commit is contained in:
parent
9aafc9b37c
commit
2f75d1c85b
19
README.md
19
README.md
@ -4,19 +4,28 @@
|
|||||||
<h1 align="center"> shortn </h1>
|
<h1 align="center"> shortn </h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
HTML/CSS/JS Framework Free ✅ • Lightweight ✅ • Functional ✅ • No plaintext passwords ✅
|
Pure vanilla HTML/CSS/JS ✅ • Lightweight ✅ • Functional ✅ • No plaintext passwords ✅
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
Simple link shortener built with flask.
|
Simple link shortener built with flask.
|
||||||
|
|
||||||
## Installation
|
> ![WARNING] PLEASE CHANGE THE SECRET IN `app.py` BEFORE RUNNING IN PRODUCTION (this applies to the docker installation as well)
|
||||||
|
|
||||||
|
- [Installation (no docker)](#installation-no-docker)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [Installation (docker)](#installation-docker)
|
||||||
|
- [Users](#users)
|
||||||
|
- [TODOs](#todos)
|
||||||
|
|
||||||
|
|
||||||
|
## Installation (no docker)
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.confest.im/boyan_k/shortn
|
git clone https://git.confest.im/boyan_k/shortn
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage (no docker)
|
### Usage
|
||||||
```bash
|
```bash
|
||||||
python manage_users.py init # to create the database
|
python manage_users.py init # to create the database
|
||||||
python manage_users.py add # to add a user
|
python manage_users.py add # to add a user
|
||||||
@ -28,10 +37,10 @@ python manage_users.py list # to list users
|
|||||||
python manage_users.py remove --username <username> # to remove a user
|
python manage_users.py remove --username <username> # to remove a user
|
||||||
|
|
||||||
# Finally, running the app
|
# Finally, running the app
|
||||||
python app.py
|
python app.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage (docker)
|
## Installation (docker)
|
||||||
This will init the database and create a user with the username `admin` and password `admin`.
|
This will init the database and create a user with the username `admin` and password `admin`.
|
||||||
```bash
|
```bash
|
||||||
docker compose up -d # remove -d for foreground
|
docker compose up -d # remove -d for foreground
|
||||||
|
@ -5,7 +5,7 @@ from werkzeug.security import generate_password_hash, check_password_hash
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.secret_key = 'your_secret_key' # Replace with a strong secret key
|
app.secret_key = 'super secret key' # FIXME: CHANGE THISSSSSSSSS!
|
||||||
|
|
||||||
# Database initialization
|
# Database initialization
|
||||||
DATABASE = 'database.db'
|
DATABASE = 'database.db'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user