Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example links on frontend #106

Open
wants to merge 16 commits into
base: test
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ Contributions are what make the open source community such an amazing place to l

<ins>Please make sure to follow our guidelines below before making any contributions.</ins>


- [Contributing](#contributing)
- [Understanding Coding-Resources-API branch structure](#understanding-coding-resources-api-branch-structure)
- [Permanent Branches](#permanent-branches)
- [Main](#main)
- [Test](#test)
- [Resources](#resources)
- [How often should I stage changes?](#how-often-should-i-stage-changes)
- [Where should I make my pull request to?](#where-should-i-make-my-pull-request-to)
- [Creating an Issue](#creating-an-issue)
- [How to make a PR](#how-to-make-a-pr)

## Understanding Coding-Resources-API branch structure
### Permanent Branches
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<a href="https://github.com/the-api-administration/coding-resources-api"><strong>Explore the docs »</strong></a>
<br />
<br />
<a href="https://coding-resources-api.herokuapp.com/">View Demo</a>
<a href="https://coding-resources-api.up.railway.app/">View Demo</a>
·
<a href="https://github.com/the-api-administration/coding-resources-api/issues">Report Bug</a>
·
Expand Down Expand Up @@ -73,15 +73,15 @@ Search for coding resources by relevant keywords. This API serves educational co

## Getting Started

Simply visit: <a href="https://coding-resources-api.herokuapp.com/">https://coding-resources-api.herokuapp.com/</a> and read our documentation to learn how to interact with our API! If you would like to help us out, feel free to create issues through our github repo.
Simply visit: <a href="https://coding-resources-api.up.railway.app/">https://coding-resources-api.up.railway.app/</a> and read our documentation to learn how to interact with our API! If you would like to help us out, feel free to create issues through our github repo.

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- USAGE EXAMPLES -->

## Usage

Access our API endpoints to recieve coding resource data in JSON format.
Access our API endpoints to receive coding resource data in JSON format.

<p align="right">(<a href="#top">back to top</a>)</p>

Expand All @@ -91,7 +91,7 @@ Access our API endpoints to recieve coding resource data in JSON format.

- [X] Add search functionality
- [ ] Offer more resources
- [ ] Support mobile devices
- [X] Support mobile devices
- [ ] Create more endpoints

See the [open issues](https://github.com/the-api-administration/coding-resources-api/issues) for a full list of proposed features (and known issues).
Expand Down Expand Up @@ -129,6 +129,7 @@ Distributed under the MIT License. See <a href="https://github.com/the-api-admin
- [@Dev_Ethos](https://twitter.com/dev_ethos/)
- [@ErikaTeal_](https://twitter.com/erikateal_)
- [@JacobEGood](https://twitter.com/jacobegood)
- [@MERN_Man_Luke](https://twitter.com/MERN_Man_Luke)
- [@MoraCodes](https://twitter.com/moracodes)

<p align="right">(<a href="#top">back to top</a>)</p>
Expand Down
3 changes: 1 addition & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ const PORT = process.env.PORT || 8000;

app.set('view engine', 'ejs')
app.use(cors());
app.use(express.static(__dirname + '/public'));
app.use('/public', express.static(__dirname + '/public'));
app.use(express.static('public'));

app.get('/', (req, res) => {
if (resources) {
Expand Down
28 changes: 14 additions & 14 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<body>
<div class="frame">
<nav>
<img src="public/assets/logo.svg" alt="logo" />
<img src="assets/logo.svg" alt="logo" />
<button id="contributors">Contributors</button>
</nav>
<main>
Expand Down Expand Up @@ -105,14 +105,14 @@
<section class='endpoints'>
<div class='url'>
<h3>Direct link to the complete resources object or a filtered object after using a keyword:</h3>
<code>https://coding-resources-api.herokuapp.com/api</code>
<code>https://coding-resources-api.up.railway.app/api</code>
<h4>*The "/api" endpoint will return every resource object in an array.</h4>
<code>https://coding-resources-api.herokuapp.com/api/<span>&lt;keyword&gt;</span></code>
<code>https://coding-resources-api.up.railway.app/api/<span>&lt;keyword&gt;</span></code>
<h4>*The "/api/keyword" endpoint accepts a keyword that will be used to search through an array of resources by the content the resource provides.</h4>
</div>
<div class='js-fetch'>
<h3>Example code-block of how to fetch with JavaScript:</h3>
<code id='js-example'>const URL = `https://coding-resources-api.herokuapp.com/api/<span>${keyword}</span>`;<br><br>
<code id='js-example'>const URL = `https://coding-resources-api.railway.com/api/<span>${keyword}</span>`;<br><br>
fetch(URL)<br>
&emsp;&emsp;&emsp;.then(res => res.json())<br>
&emsp;&emsp;&emsp;.then(data => console.log(data))<br>
Expand All @@ -124,7 +124,7 @@
<section class="contributors">
<div class='section'>
<div class='card' id='jacob'>
<img src="public/assets/Jacob.jpg" alt="Jacob's photo">
<img src="assets/Jacob.jpg" alt="Jacob's photo">
<div class='cont-info'>
<h4>Jacob Asper</h4>
<div class='icons'>
Expand All @@ -135,7 +135,7 @@
</div>
</div>
<div class='card' id='erika'>
<img src="public/assets/Erika.jpg" alt="Erika's photo">
<img src="assets/Erika.jpg" alt="Erika's photo">
<div class='cont-info'>
<h4>Erika Teal</h4>
<div class='icons'>
Expand All @@ -146,7 +146,7 @@
</div>
</div>
<div class='card' id='alexisintech'>
<img src="public/assets/Alex.png" alt="Alexis' photo">
<img src="assets/Alex.png" alt="Alexis' photo">
<div class='cont-info'>
<h4>Alexisintech</h4>
<div class='icons'>
Expand All @@ -159,7 +159,7 @@
</div>
<div class='section'>
<div class='card' id='brian'>
<img src="public/assets/Brian.png" alt="Brian's photo">
<img src="assets/Brian.png" alt="Brian's photo">
<div class='cont-info'>
<h4>Brian Schnee</h4>
<div class='icons'>
Expand All @@ -170,7 +170,7 @@
</div>
</div>
<div class='card' id='alondra'>
<img src="public/assets/Alondra.png" alt="Alondra's photo">
<img src="assets/Alondra.png" alt="Alondra's photo">
<div class='cont-info'>
<h4>Alondra Mora</h4>
<div class='icons'>
Expand All @@ -181,7 +181,7 @@
</div>
</div>
<div class='card' id='bianca'>
<img src="public/assets/Bianca.jpg" alt="Biancas's photo">
<img src="assets/Bianca.jpg" alt="Biancas's photo">
<div class='cont-info'>
<h4>Bianca T.</h4>
<div class='icons'>
Expand All @@ -192,7 +192,7 @@
</div>
</div>
<div class='card' id='jacobg'>
<img src="public/assets/JacobGood.jpg" alt="Jacob Good's photo">
<img src="assets/JacobGood.jpg" alt="Jacob Good's photo">
<div class='cont-info'>
<h4>Jacob Good</h4>
<div class='icons'>
Expand All @@ -205,7 +205,7 @@
</div>
<div class='section'>
<div class='card' id='sebastian'>
<img src="public/assets/Sebastian.png" alt="Sebastian's photo">
<img src="assets/Sebastian.png" alt="Sebastian's photo">
<div class='cont-info'>
<h4>Sebastian O.</h4>
<div class='icons'>
Expand All @@ -216,7 +216,7 @@
</div>
</div>
<div class='card' id='alyssha'>
<img src="public/assets/Alyssha.jpg" alt="Alyssha's photo">
<img src="assets/Alyssha.jpg" alt="Alyssha's photo">
<div class='cont-info'>
<h4>Alyssha L.</h4>
<div class='icons'>
Expand All @@ -227,7 +227,7 @@
</div>
</div>
<div class='card' id='dana'>
<img src="public/assets/Dana.jpg" alt="Dana's photo">
<img src="assets/Dana.jpg" alt="Dana's photo">
<div class='cont-info'>
<h4>Dana Lee</h4>
<div class='icons'>
Expand Down