An open API service indexing awesome lists of open source software.

https://github.com/3sidedcube/buhackathonapi


https://github.com/3sidedcube/buhackathonapi

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          



3 Sided Cube

# BU Hackathon Impact API

## Environments

The main environment can be found at [https://bu-hackathon-api.herokuapp.com/api/v1](https://bu-hackathon-api.herokuapp.com/api/v1)

## Documentation

The documentation for the API can be found [here](https://bu-hackathon-api.herokuapp.com/api/v1/docs).

For a little background and some direction for using the API, you can read an introduction [here](https://bu-hackathon.cubeapis.com).

## Local Development

This project uses Laravel Sail for local development which uses [Docker](https://www.docker.com/get-started). You will
need to ensure that you have Docker installed and running on your machine.

### First time setup

1. Copy the example environment file:
```shell
cp .env.example .env
```

2. Install Composer dependencies:
```shell
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/opt \
-w /opt \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs
```

3. Run the following commands:
```shell
./vendor/bin/sail up -d
./vendor/bin/sail artisan key:generate
./vendor/bin/sail artisan migrate
./vendor/bin/sail artisan db:seed
```

4. The API should now be available at [http://localhost](http://localhost).

### Stopping the project

1. To stop the project docker containers, simply run the following command:
```shell
./vendor/bin/sail down
```

### Starting the project again

1. To start the project docker containers after you've completed the first time use, simply run the following command:
```shell
./vendor/bin/sail up -d
```

## Deployments

The API is deployed using a free Heroku dyno. You can use Heroku or a similar service to deploy your own API at zero cost (well, not Heroku because they're discontinuing free dynos in November although there will be other options - you can even host an API on a Raspberry PI!)