https://github.com/ryoung786/strd
URL Shortener
https://github.com/ryoung786/strd
elixir phoenix
Last synced: 8 months ago
JSON representation
URL Shortener
- Host: GitHub
- URL: https://github.com/ryoung786/strd
- Owner: ryoung786
- Created: 2021-12-17T21:34:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-21T16:17:09.000Z (over 4 years ago)
- Last Synced: 2023-03-10T19:24:41.719Z (over 3 years ago)
- Topics: elixir, phoenix
- Language: Elixir
- Homepage: https://strd.ryoung.info
- Size: 1.25 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Strd
A URL Shortener exercise
[https://strd.ryoung.info](strd.ryoung.info)

## Setup
```bash
$ git clone
$ cd strd
$ make setup # depends on docker, please ensure docker is running
```
This will build the application, create the database, and run the migrations.
Note: It's possible this may fail the first time, as the web server may try to connect to the db before it is ready to accept connections. If this happens, you can run this command again.
## Running the app
```bash
$ make server
```
This runs `docker-compose up` to spin up the phoenix service and the postgres db. Once this is running, you should be able to navigate to [http://localhost:8080](http://localhost:8080) and see the app running.
## Running the tests
To run the tests locally, run
```bash
$ make test
```
Alternatively, the test suite will be run automatically on any pull request or commit pushed to the `main` branch on Github via a Github Action.
## Deploying to production
A Github Action has been set up to deploy to heroku upon a successful push to the `main` branch that passes the test suite. Once the workflow finishes running you'll be able to access the new version at [https://strd.ryoung.info](strd.ryoung.info)