netcut.cn style, minimal editable online clipboard.
Developed using Flask, Vue 3, Vuetify 3, TypeScript. Full i18n support.
Runs on Node.js v18.16.0, Python 3.11.3.
- Install
poetry
andyarn
. - Install Python and Node.js dependencies.
# Install python dependencies
pushd server
poetry install --no-root
popd
# Install nodejs dependencies
pushd frontend
yarn install
popd
- Edit
server/app/note_const.py
,server/app/config.py
. - Copy
.env.development
to.env.production
and edit it. Also edit.env
if needed. - Generate
APP_SECRET
as described inserver/app/config.py
and save it to.env.production
. - Init database using
flask db upgrade
inserver
directory. - Modify
server/app/__init__.py
and configureProxyFix
if you are deploying behind a reverse proxy.
First, you need to build frontend files.
cd frontend
yarn build
Then, you can run the server.
cd server
FLASK_ENV=production poetry run python wsgi.py
# Get clip named my_clip
curl http://example.com/raw/my_clip?pwd=my_password
# frontend
cd frontend
yarn dev
# backend
cd server
poetry run flask run --debug
poetry shell
flask db init
flask db migrate
flask db upgrade
Password protect: sha512(note.password)
through Internet, pbkdf2_sha256(sha512(note.password))
in database.
File access: JWT generated with note.name
and pbkdf2_sha256(sha512(note.password))
(the hash stored in database as above)
Content encryption: AES-256-CBC/PKCS7 with sha256(note.password)
, see CryptoJS behaviour
- Download and install URL Rewrite
- Regex pattern:
^private-name((/(.+)?)|)$
- Rewrite URL:
http://127.0.0.1:5000{R:1}
- Append query string:
true
How to set URL length and HTTP POST content length limits in IIS - WKB240363