Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/logicandtrick/twhl
TWHL Website
https://github.com/logicandtrick/twhl
community-website half-life laravel mysql php
Last synced: about 3 hours ago
JSON representation
TWHL Website
- Host: GitHub
- URL: https://github.com/logicandtrick/twhl
- Owner: LogicAndTrick
- License: mit
- Created: 2015-03-21T05:30:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-31T08:19:03.000Z (19 days ago)
- Last Synced: 2024-10-31T09:18:46.632Z (19 days ago)
- Topics: community-website, half-life, laravel, mysql, php
- Language: PHP
- Homepage: http://twhl.info
- Size: 18.5 MB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## TWHL Website
TWHL is a mapping and modding resource website for the Half-Life and Source engines.
- [Visit twhl.info](http://twhl.info)
### Getting a dev environment set up
TWHL4 uses the [Laravel](http://laravel.com/) framework. Detailed instructions can be found
in the Laravel docs, but here's the basic steps:0. If you know how to use Docker, see the [docker-for-development](docker-for-development/readme.md) folder and skip many of the following steps.
1. Get an Apache environment with MySQL (5.5+) and PHP (8+)
- The easiest way to do this is to download [XAMPP](https://www.apachefriends.org/index.html)
for your platform and follow the install instructions.
- Put the **php**/**php.exe** executable path into your system's environment variables
- Make sure you're using the right php version, OSX and some linux distros will ship
with a different version.
2. Install [Node JS](https://nodejs.org/) for your platform
3. Install [Git](https://git-scm.com/) for your platform
- If you're on Windows or OSX and aren't used to command line Git, you can install
[SourceTree](https://www.sourcetreeapp.com/) which is pretty handy.
4. Install [Composer](https://getcomposer.org/) for your platform
5. Clone the twhl repo using Git
- Make sure the repo folder has the correct read & execute permissions
6. In the repo's root folder, install the app dependencies using Composer by running:
`composer install`
7. Add this to your `apache/conf/httpd.conf` - this config assumes your repo is
at `C:\twhl`, change the path for your system as required.Listen 82
ServerName localhost
DocumentRoot C:/twhl/public
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
8. Start up XAMPP and run Apache and MySQL (or MariaDB, whatever), and then get into
PhpMyAdmin. Create a database called `twhl` with the collation `utf8mb4_unicode_ci`.
9. We're almost there. Find the `.env.example` file in the root folder, and copy it to
a new file called simply `.env`. The default settings should be fine, but you can
change them if you have a different setup for your DB server and so on.
- After creating the .env file, you should run `php artisan key:generate` in order to
create an encryption key.
10. At this point, [http://localhost:82/](http://localhost:82/) should give you the
Laravel splash screen. If it doesn't, something's gone wrong. Otherwise, carry on...
11. In the git repo root folder, run:
- `php artisan migrate --seed` (requires php on path)
- I got an error doing this and had to run `mysql/bin/mysql_upgrade.exe`, but
this may be because I had an older version of MySQL installed. If you get an error
about "Cannot load from mysql.proc", try doing this. Drop and re-create the twhl
database before trying again.
- `npm install`
- `npm run development`
12. Hopefully, you're done! Go to [http://localhost:82/auth/login](http://localhost:82/auth/login)
to log in. User: `[email protected]` // Pass: `admin`.### Working with Laravel
Some general notes if you're not used to Laravel/Composer:
- If `composer.json` (or `composer.lock`) changes, run `composer install` to get the latest library versions.
- Run `composer self-update` if it nags you, it's a good idea to stay up to date.
- When making changes to `*.css`, `*.scss` and `*.js` files, you need to run `npm run development` to bundle
those changes into the compiled CSS and JS files. The easiest way to do this is to run
`npm run watch`, which will watch the files for changes and auto-build when needed.