Skip to content

hng-tech/kidstories

Repository files navigation

Kidstories

Kid Stories

Guide to Contribute

  1. Fork the repo to your GitHub account
  2. Clone to repo to your local
  3. Checkout BE
git checkout BE
  1. Set up your project. (See the Initial Set Up section below)
  2. Make your changes
  3. Push your changes to your repo
  4. Make a PR to the project repo, select compare across forks
  5. In the dropdown section, select the BE branch
  6. Make the PR

Initial Set Up

  1. Create .env file by running; create .env.example file manually if not found
cp .env.example .env
  1. Install dependencies
composer install
  1. Update .env with your database details
DB_DATABASE=YOUR_DATABASE_NAME
DB_USERNAME=YOUR_DATABASE_USERNAME
DB_PASSWORD=YOUR_DATABASE_PASSWORD
  1. Generate laravel application key
php artisan key:generate
  1. Migrate tables
php artisan migrate
  1. Create encryption keys for Laravel Passport
php artisan passport:install
  1. Start server
php artisan serve
  1. Test to see if API is up. Launch Postman or Insomia and send a GET request to
http://localhost:8000/api/v1/test

You should get a response:

{
  "message": "You are set!"
}