Skip to content

Local Dev Setup

H. C. Kruse edited this page Jan 11, 2023 · 1 revision

Pre-requisits

  • PHP 8.x
  • php-zip
  • php-intl
  • php-gmp
  • php-gd
  • php-pdo_sqlite
  • Composer
  • NPM

Setup

  1. Clone the repository: https://github.com/StarCitizenWiki/API.git
  2. Change into the newly created directory
  3. Install all required packages: composer install
  • If you are on Windows you may need to ignore gd: composer install --ignore-platform-req=ext-gd
  1. Optional: Install the npm packages (if you want to update the styles): npm install
  2. Create a file called .env with the following content:
APP_URL=http://localhost
APP_ENV=local
APP_DEBUG=false
APP_KEY=

LOG_LEVEL=info


# Set to true to skip MediaWiki OAuth and always login with an admin account
# DO NOT USE IN PRODUCTION
ADMIN_AUTH_USE_STUB=true

# SQLITE
DB_CONNECTION=sqlite
DB_DATABASE=db.sqlite
  1. Create the following empty file: database/db.sqlite
  2. Run the following commands to get started:
php artisan key:generate
php artisan migrate
php artisan db:seed
  1. Import some data: php artisan data:populate --skipGalactapedia --skipCommLinks --skipScUnpacked
  2. Start the API: php artisan serve
Clone this wiki locally