Skip to content

Commit

Permalink
Merge pull request #4 from miRoox/pw
Browse files Browse the repository at this point in the history
need password in server mode
  • Loading branch information
miRoox authored May 23, 2024
2 parents fd32978 + 8665855 commit c34a5b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"private": true,
"scripts": {
"build": "tiddlywiki --build index && mv output/index.html .",
"start": "tiddlywiki --listen port=7777 anon-username=miRoox",
"start": "bash start.sh",
"test": "npm run build"
},
"repository": {
Expand Down
10 changes: 10 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/env bash

set -e

if [ -z "$WIKIPW" ]; then
echo "Error: WIKIPW environment variable is not set."
exit 1
fi

tiddlywiki --listen host="${HOST:-127.0.0.1}" port=7777 username=miRoox password="$WIKIPW" 'readers=(anon)' 'writers=(authenticated)' admin=miRoox

0 comments on commit c34a5b7

Please sign in to comment.