This API provides job listings and job-related events for the Hack 4 Good Workforce Development Project.
The project is written using a PHP
framework called Laravel
. The following will need to be installed to set up a local development environment.
-
- Install
PHP
for your platform. Mac users can useHomebrew
. - Project tested with version 7.4.0 of PHP.
- Install
-
- Dependency manager for PHP.
- Install
Composer
for your platform. Mac users can useHomebrew
.
-
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
- There are many
SQLite
browsers available to use. For example, DB Browser for SQLite.
- There are many
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
- Run the database migrations:
php artisan migrate
- Seed the database:
php artisan db:seed
-
Valet Mac only
- For the Mac minimalists that want to set up a Laravel development environment, Valet is a great alternative to
Homestead
.
- For the Mac minimalists that want to set up a Laravel development environment, Valet is a great alternative to
-
- For starting new Laravel projects and making the
laravel cli tool
available globally in your terminal of choice.
- For starting new Laravel projects and making the
Node dependencies:
npm install
PHP dependencies:
composer install
To start the app, in a terminal execute:
php artisan serve
For more examples and usage, please refer to the Wiki.
- Fork it (https://github.com/sgfdevs/h4g-api-jobs/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin head
) - Create a new Pull Request