https://github.com/3sidedcube/buhackathonapi
https://github.com/3sidedcube/buhackathonapi
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/3sidedcube/buhackathonapi
- Owner: 3sidedcube
- Created: 2022-09-19T22:01:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-22T14:22:50.000Z (over 3 years ago)
- Last Synced: 2025-06-03T17:29:28.576Z (about 1 year ago)
- Language: PHP
- Size: 63.5 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# 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!)