Compare commits

...

3 Commits

Author SHA1 Message Date
Nat 48d07472c9
Upgrade to the latest Cataas API
They made a backwards-incompatible change when I wasn't looking :(
2024-03-10 12:15:16 -07:00
Nat bc5a5fdf65
Add screenshots to README 2024-03-10 12:14:35 -07:00
Nat 7c3ddb6772
Fix minor formatting error in README 2024-03-10 11:55:41 -07:00
6 changed files with 13 additions and 6 deletions

View File

@ -2,13 +2,20 @@
This project was created in under a day in 2022 as a part of an assessment. It's a cat bookmarking web app! It consumes JSON representations of cat images accessible via the [Cataas](https://cataas.com) API, the links to which can be permanently stored in a bookmark database.
## Screenshots
![The home page, describing what the application is and how to generate an account](meta/screenshot-home.jpg
![Screenshot of the form used to download a random cat photo and save it to the collection](meta/screenshot-form.jpg)
![Screenshot of the collection, allowing you to preview a bookmarked cat in a particular named collection and remove it if needed](meta/screenshot-collection.jpg)
## Running the server
To run the server, you'll need:
* Elixir, which depends on Erlang. Detailed instructions on how to install Elixir and Erlang can be found on [the Elixir website](https://elixir-lang.org/install.html). In most cases, installing Elixir will get you a copy of Erlang as well.
* Node.js. If you've been blessed to have never needed to download Node on your device, you can end that streak now by visiting [the Node.js download page](https://nodejs.org/en/download)
* PostgreSQL, which you'll need running. You can find information on how to install it on [the PostgreSQL download page](https://www.postgresql.org/download/) as well.
## Aside: Setting up Postgres
### Aside: Setting up Postgres
By default this project assumes your PostgreSQL install has a user with the name "postgres" whose password is "postgres". Is that not the case? Either:
* Change the configuration to use the right credentials. Open `./config/dev.exs` and find and edit:

View File

@ -80,7 +80,7 @@ const Bookmarks = (props) => {
headers: {...headers,
"Content-Type": "application/json"
},
body: JSON.stringify({ ...formState, remote_id: randomCat.id })
body: JSON.stringify({ ...formState, remote_id: randomCat._id })
});
// Update the category list in case a new one was added
@ -112,7 +112,7 @@ const Bookmarks = (props) => {
<div>
<img className = "random-image center-box-inner"
src = { randomCat != null
? cataas(randomCat.url)
? cataas("/cat/" + randomCat._id)
: null
}
alt = { randomCat != null

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
meta/screenshot-form.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
meta/screenshot-home.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

File diff suppressed because one or more lines are too long