Compare commits
3 Commits
92900176a6
...
48d07472c9
Author | SHA1 | Date |
---|---|---|
Nat | 48d07472c9 | |
Nat | bc5a5fdf65 | |
Nat | 7c3ddb6772 |
|
@ -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:
|
||||
|
|
|
@ -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 |
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue