Skip to content

sgfdevs/h4g-api-jobs

Repository files navigation

Hack 4 Good Project Workforce Development API

This API provides job listings and job-related events for the Hack 4 Good Workforce Development Project.

Development setup

The project is written using a PHP framework called Laravel. The following will need to be installed to set up a local development environment.

Software

  • Node

  • PHP

    • Install PHP for your platform. Mac users can use Homebrew.
    • Project tested with version 7.4.0 of PHP.
  • Composer

    • Dependency manager for PHP.
    • Install Composer for your platform. Mac users can use Homebrew.
  • Database

    • Laravel supports a few databases. Review the documentation for guidance.
    • Tested successfully with MySQL 8.0.19.
    • For a simple solution, consider using SQLite

Database Configuration

Laravel uses .env files for configuring the app for a specific environment. See the documentation for more information. To configure Laravel to use a particular database, make of copy of .env.example and save it as .env.

To set up Laravel to use SQLite for example, find the DB_CONNECTION section, and modify the following lines to:

DB_CONNECTION=sqlite
DB_DATABASE=/absolute/path/to/database.sqlite

Seeding the Database

  1. Run the database migrations:
php artisan migrate
  1. Seed the database:
php artisan db:seed

Optional Software

  • Valet Mac only

    • For the Mac minimalists that want to set up a Laravel development environment, Valet is a great alternative to Homestead.
  • Homestead

  • Laravel

    • For starting new Laravel projects and making the laravel cli tool available globally in your terminal of choice.

Installation

Node dependencies:

npm install

PHP dependencies:

composer install

Running the app

To start the app, in a terminal execute:

php artisan serve

Usage example

For more examples and usage, please refer to the Wiki.

Contributing

  1. Fork it (https://github.com/sgfdevs/h4g-api-jobs/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin head)
  5. Create a new Pull Request

Releases

No releases published

Packages

No packages published

Languages