-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(main.go): add index.html route to display available routes and…
… url params 🐛 fix(main.go): fix picsum route to return the same content type as the request ✨ feat(main.go): add checkError function to handle errors and return http status codes ✨ feat(main.go): add stringToInt64 function to convert string to int64 for seed ✨ feat(main.go): add getWHUrlParams function to get width and height url params and check if they are in range ✨ feat(main.go): add seed to picsum route and print it to console ✨ feat(main.go): add support for configurable port from .env file in main function and print it to console
- Loading branch information
Showing
5 changed files
with
135 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
PORT=8080 | ||
PORT=3001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<main style="text-align: center;"> | ||
<a href="https://github.com/readyyyk/randImgAPI"> <h1> https://github.com/readyyyk/randImgAPI </h1> </a> | ||
</main> | ||
|
||
<h2> | ||
Use some of these routes: | ||
</h2> | ||
<ul> | ||
<li> <i>/hashmap</i> </li> | ||
<li> <i>/picsum</i> </li> | ||
</ul> | ||
<h2> Use these url params: </h2> | ||
<ul> | ||
<li> <b> seed </b> <small>int/string</small> </li> | ||
<li> <b> w </b> <small>int (for hashmaps <100)</small> </li> | ||
<li> <b> h </b> <small>int (for hashmaps <100)</small> </li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters