-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up the development environment
The purpose of these documents is to illustrate how development was and should be done for the AiSPI repository. They are meant for anyone interested in upgrading or maintaining the system after I, Joe Thomas leave.
- PHP 7.2.0 or higher
- Node 8.9.1 or higher
- NPM 5.5.1 or higher
Cool, so once you've downloaded and installed the dependencies on your machine you may begin the build/development process. Make sure you're either developing on your own branch git checkout -b your_lame_branch_name and DO NOT COMMIT DIRECTLY TO PRODUCTION! If you do, my ghost will come back and haunt you.
There are two parts to developing the project, the PHP API, and the VueJS bundle. These two pieces are located in a seperate places and come together in the end when you publish to master. The VueJS bundle is webpackified into a single html file and that is located in the folder /aispi, this is then served by the top level file index.php.
To set this up, clone the repository, go into that directory and switch to your branch directory.
git clone https://github.com/CodeTheChangeUBC/aispi###
cd aispi
git checkout -b my_branch_nameNext you want to run the PHP API server and the Webpack process. Make sure you run these in separate terminals, on Windows I use the start command to do that, not sure about Mac though.
start php -S 127.0.0.1:3000
cd aispi
npm install
npm startPlease note, if this is not your first time running the Webpack server, you can skip the npm install part. Additionally, make sure that you use 127.0.0.1 and not localhost for the PHP server.