diff options
| author | Camil Staps | 2020-01-23 20:27:48 +0100 | 
|---|---|---|
| committer | Camil Staps | 2020-01-23 20:27:48 +0100 | 
| commit | b6efc2e69a4dda2f6e3b3a2d37f1e91060de8784 (patch) | |
| tree | 5ebd866e31f903f27ab7a9ca6f2746062dee801a | |
| parent | Fix link in readme (diff) | |
Update readme
| -rw-r--r-- | Readme.md | 169 | 
1 files changed, 90 insertions, 79 deletions
| @@ -1,101 +1,112 @@ -# ParseTrainer +# λύω-trainer -A simple app to practice Hebrew verbs. +A simple app to practice the Ancient Greek verbal system. -## Demo - -[parse.hebrewtools.org][demo] +See [luo.camilstaps.nl][live]  ## Installation -    $ git clone https://github.com/HebrewTools/ParseTrainer -    $ cd ParseTrainer -    $ composer install +```bash +git clone https://git.camilstaps.nl/clone/luo-parsetrainer.git +cd luo-parsetrainer +composer install +```  ## Configuration -First, create a MySQL database and a user that can connect to it. In this example, we'll use `hebrew_db`, `hebrew_user` and `hebrew_pass`. +First, create a MySQL database and a user that can connect to it. In this +example, we'll use `luo_db`, `luo_user` and `luo_pass`.  Create a `.env` file in the root directory with at least the following options: -    APP_ENV=production -    APP_DEBUG=false -    APP_KEY= # a 32-char random string -    APP_URL=https://demo.camilstaps.nl/LuoParseTrainer/ # e.g., use your own URL here +``` +APP_ENV=production +APP_DEBUG=false +APP_KEY= # a 32-char random string +APP_URL=https://example.org/luo/ # e.g., use your own URL here -    APP_LOCALE=en -    APP_FALLBACK_LOCALE=en +APP_LOCALE=en +APP_FALLBACK_LOCALE=en -    DB_CONNECTION=mysql -    DB_HOST=localhost -    DB_PORT=3306 -    DB_DATABASE=hebrew_db -    DB_USERNAME=hebrew_user -    DB_PASSWORD=hebrew_pass +DB_CONNECTION=mysql +DB_HOST=localhost +DB_PORT=3306 +DB_DATABASE=luo_db +DB_USERNAME=luo_user +DB_PASSWORD=luo_pass -    CACHE_DRIVER=memchached -    SESSION_DRIVER=memcached -    QUEUE_DRIVER=database +CACHE_DRIVER=memchached +SESSION_DRIVER=memcached +QUEUE_DRIVER=database +```  Return to the root directory and run: -    $ php artisan migrate --seed +```bash +php artisan migrate --seed +```  ### Nginx -You need to enable PHP and redirect everything to `server.php`. Configuration on the root of a site is straightforward: - -    server { -        listen [::]:80; -        server_name myhostname; -        root /.../ParseTrainer; -        index index.php index.html index.htm; -        charset utf-8; - -        location / { -            autoindex off; -            try_files $uri $uri/ /server.php$is_args$query_string; -        } - -        location ~ \.php$ { -            # whatever you do to make PHP work -        } - -        location ~ /\. { -            deny all; -        } -    } - -In a subdirectory, we need to enforce trailing slashes and do some special things. This configures nginx to handle the trainer from `/ParseTrainer/`: - -    server { -        listen [::]:80; -        server_name myhostname; -        root /...; -        index index.php index.html index.htm; -        charset utf-8; - -        rewrite ^([^.]*[^/])$ $1/ permanent; - -        location ~ ^/ParseTrainer/(.*)\.php$ { -            try_files $uri $uri/ /ParseTrainer/server.php$is_args$query_string; - -            # whatever you do to make PHP work -        } - -        rewrite /ParseTrainer/?$ /ParseTrainer/public/index.php; -        location /ParseTrainer { -            try_files $uri $uri/ /ParseTrainer/server.php$is_args$query_string; -        } - -        location / { -            autoindex off; -        } - -        location ~ /\. { -            deny all; -        } -    } +You need to enable PHP and redirect everything to `server.php`. Configuration +on the root of a site is straightforward: + +```nginx +server { +	listen [::]:80; +	server_name myhostname; +	root /.../luo; +	index index.php index.html index.htm; +	charset utf-8; + +	location / { +		autoindex off; +		try_files $uri $uri/ /server.php$is_args$query_string; +	} + +	location ~ \.php$ { +		# whatever you do to make PHP work +	} + +	location ~ /\. { +		deny all; +	} +} +``` + +In a subdirectory, we need to enforce trailing slashes and do some special +things. This configures nginx to handle the trainer from `/luo/`: + +```nginx +server { +	listen [::]:80; +	server_name myhostname; +	root /...; +	index index.php index.html index.htm; +	charset utf-8; + +	rewrite ^([^.]*[^/])$ $1/ permanent; + +	location ~ ^/luo/(.*)\.php$ { +		try_files $uri $uri/ /luo/server.php$is_args$query_string; + +		# whatever you do to make PHP work +	} + +	rewrite /luo/?$ /luo/public/index.php; +	location /luo { +		try_files $uri $uri/ /luo/server.php$is_args$query_string; +	} + +	location / { +		autoindex off; +	} + +	location ~ /\. { +		deny all; +	} +} +```  ## License @@ -104,5 +115,5 @@ Licensed under GPL v3.0, see the LICENSE file.  This project uses the [SBL Greek][sblgrk] font which is licensed under the SBL Font User Agreement. -[demo]: https://parse.hebrewtools.org/ +[live]: https://luo.camilstaps.nl/  [sblgrk]: https://www.sbl-site.org/educational/biblicalfonts.aspx | 
