Skip to content

Instantly share code, notes, and snippets.

@aldidoanta
Last active May 9, 2020 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aldidoanta/cfd5699f2c423faaa65cbdbde97cb85c to your computer and use it in GitHub Desktop.
Save aldidoanta/cfd5699f2c423faaa65cbdbde97cb85c to your computer and use it in GitHub Desktop.

Instalasi PHP dan Composer Menggunakan XAMPP

  1. Install XAMPP https://www.apachefriends.org/index.html. Yang dibutuhkan hanya package yang berhubungan dengan Apache dan MySQL

1.XAMPP Installation

  1. Install Composer. Instruksi detaiil bisa dilihat di https://getcomposer.org/download/, atau langsung download installer dalam bentuk .exe di https://getcomposer.org/Composer-Setup.exe.

2.Composer Installation

2a. Locate php.exe yang ada di <XAMPP installation path>\php\php.exe. Jika installation path mengandung tanda kurung, misalnya Progrmam Files (x86), buka <XAMPP installation path>\php\php.ini, dan pastikan value dari extension_dir menggunakan double quote (").

  1. Buka direktori sapawarga-app/api, lalu jalankan composer install.

  2. Jalankan php yii serve. By default, API host adalah localhost:8080.

  3. Untuk memastikan API berjalan, buka localhost:8080/ping. Jika ada response dallam bentuk string pong, API sudah berjalan

TODO Integrasi MySQL ke API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment