Coder Social home page Coder Social logo

oskarlh / twhl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from logicandtrick/twhl

0.0 1.0 0.0 23.88 MB

TWHL Website

Home Page: http://twhl.info

License: MIT License

PHP 50.03% JavaScript 25.48% Shell 0.10% C# 0.09% SCSS 3.56% Blade 20.64% Dockerfile 0.10%

twhl's Introduction

TWHL Website

TWHL is a mapping and modding resource website for the Half-Life and Source engines.

Getting a dev environment set up

TWHL4 uses the Laravel framework. Detailed instructions can be found in the Laravel docs, but here's the basic steps:

  1. If you know how to use Docker, see the docker-for-development folder and skip many of the following steps.

  2. Get an Apache environment with MySQL (5.5+) and PHP (8+)

    • The easiest way to do this is to download XAMPP 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.
  3. Install Node JS for your platform

  4. Install Git for your platform

    • If you're on Windows or OSX and aren't used to command line Git, you can install SourceTree which is pretty handy.
  5. Install Composer for your platform

  6. Clone the twhl repo using Git

    • Make sure the repo folder has the correct read & execute permissions
  7. In the repo's root folder, install the app dependencies using Composer by running: composer install

  8. 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
     
     <VirtualHost *:82>
     	ServerName localhost
     	DocumentRoot C:/twhl/public
     	<Directory C:/twhl/public>
     		Options Indexes FollowSymLinks Includes ExecCGI
     		AllowOverride All
     		Require all granted
     	</Directory>
     </VirtualHost>
    
  9. 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.

  10. 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.
  11. At this point, http://localhost:82/ should give you the Laravel splash screen. If it doesn't, something's gone wrong. Otherwise, carry on...

  12. 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
  13. Hopefully, you're done! Go to 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.

twhl's People

Contributors

joeltroch avatar logicandtrick avatar oskarlh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.