Code Monkey home page Code Monkey logo

tdt4237-public's Introduction

In the process of patching the web application, it may be useful to run it locally on your own computer. Below is a set of working instructions for deploying and running the web application on a Windows machine. It has been tested on a fresh install of Windows 10 on a VM. The setup will likely be similar with Mac OS X, but I don't have a ready made procedure for deploying on Mac.

  1. Download php7.0.x, the thread safe version, from http://windows.php.net/download#php-7.0

  2. Extract the downloaded archive to <your_php_directory>

  3. Open PowerShell, and type

             setx path "%path%;<your_php_directory>"
    

Restart PowerShell.

  1. Download and install XAMPP to c:\xampp (or another directory without special permissions). Download XAMPP from here: https://www.apachefriends.org/xampp-files/7.2.2/xampp-win32-7.2.2-0-VC15-installer.exe

  2. Delete the contents of C:\xampp\htdocs

  3. Open XAMPP. Open Apache > Config > httpd.conf. Replace 'DocumentRoot "C:/xampp/apache/htdocs"' with 'DocumentRoot "C:/xampp/apache/htdocs/public"'. Replace '<Directory "C:/xampp/htdocs">' with '<Directory "C:/xampp/htdocs/public">'

  4. Download and install Visual C++ Redistributable for Visual Studio 2015. https://www.microsoft.com/en-us/download/details.aspx?id=48145

  5. Download this GitHub repository to c:\xampp\htdocs, so that all files are extracted directly to htdocs/

  6. Download and install Composer. Click next on everything. https://getcomposer.org/Composer-Setup.exe

  7. In PowerShell, enter

            cd "c:\xampp\htdocs\" 
            composer install
    
  8. Open XAMPP. Start Apache and MySQL. Open MySQL -> Admin. This should open phpMyAdmin in your web browser. Click the tab that says "SQL". Copy and paste this into the text field and execute:

            create database inventory;
            use inventory;
            [all the contents of sql.txt]
    
  9. Go to http://localhost:80 in your web browser and enjoy.

You may try using another web server software, but the Pokedex AS application is a bit picky with server software configuration. The $_GET variable needs to be populated with the URL string, so that when you enter http://localhost/thisIsAURLString, var_dump($_GET); must return array(1) { ["url"]=> string(16) "thisIsAURLString" }. XAMPP Apache behaves like this by default, so it's practical and easy to use.

tdt4237-public's People

Watchers

 avatar  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.