Skip to content

moritzschramm/typos

Repository files navigation

Typos

Build Status

Web app to learn touch typing build with the Laravel PHP Framework

Development setup

Requirements

Setup

Start by copying the .env.example file to .env in the project's root directory. After that, install all dependencies by running composer install and generate an application key with php artisan key:generate If you want to use docker for development, there is a prepared docker-compose.yml file (intended only for development). However, if you haven't installed docker and docker-compose, it's probably easier to use a VM like Homestead, you just have to change some settings in your .env file (to be specific, DB_HOST and REDIS_HOST). A guide for using homestead: https://laravel.com/docs/5.5/homestead

Using docker and docker-compose

Start docker containers
docker-compose up -d
To access the application now, go to http://localhost via your browser

Stop docker containers
docker-compose down

Running php artisan on docker container

Since the docker containers run on their own network, some artisan commands that require a database connection, or any other connection to a container, will fail if called by php artisan via your local terminal. In order to make these commands work, you have to run them on the PHP docker container.
There is a little php script to make things easier:
php remote-artisan
This script will simply execute php artisan on the PHP docker container.

Running tests

Run phpunit or ./vendor/bin/phpunit

Using docker

Again, since the docker containers are on their own network, running phpunit doesn't work as expected, and, again, there is a php script called start-test, which just runs phpunit from within the php docker container.
php start-test

Migrations

Run php artisan migrate --seed (this will automatically seed the database with a test user).
You may also want to upload the wordlists and lections used by the 'training mode' of the app (php artisan load:words and php artisan load:lections). For more info, read the readme located in ./resources/assets/wordlists.

Using docker

php remote-artisan migrate --seed

License

The Laravel framework as well as Typos is open-sourced software licensed under the MIT license.

About

Web app to learn touch typing build Laravel

Resources

Stars

Watchers

Forks