diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 719f1dc..7629322 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,16 @@ Contributions are what make the open source community such an amazing place to l Please make sure to follow our guidelines below before making any contributions. - +- [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 diff --git a/README.md b/README.md index 7cadc5a..7e44e8f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Explore the docs »

- View Demo + View Demo · Report Bug · @@ -73,7 +73,7 @@ Search for coding resources by relevant keywords. This API serves educational co ## Getting Started -Simply visit: https://coding-resources-api.herokuapp.com/ 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: https://coding-resources-api.up.railway.app/ 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.

(back to top)

@@ -81,7 +81,7 @@ Simply visit: https://codi ## 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.

(back to top)

@@ -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). @@ -129,6 +129,7 @@ Distributed under the MIT License. See (back to top)

diff --git a/server.js b/server.js index f36fcae..5340443 100644 --- a/server.js +++ b/server.js @@ -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) { diff --git a/views/index.ejs b/views/index.ejs index e5cce06..48003a8 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -26,7 +26,7 @@
@@ -105,14 +105,14 @@

Direct link to the complete resources object or a filtered object after using a keyword:

- https://coding-resources-api.herokuapp.com/api + https://coding-resources-api.up.railway.app/api

*The "/api" endpoint will return every resource object in an array.

- https://coding-resources-api.herokuapp.com/api/<keyword> + https://coding-resources-api.up.railway.app/api/<keyword>

*The "/api/keyword" endpoint accepts a keyword that will be used to search through an array of resources by the content the resource provides.

Example code-block of how to fetch with JavaScript:

- const URL = `https://coding-resources-api.herokuapp.com/api/${keyword}`;

+ const URL = `https://coding-resources-api.railway.com/api/${keyword}`;

fetch(URL)
   .then(res => res.json())
   .then(data => console.log(data))
@@ -124,7 +124,7 @@
- Jacob's photo + Jacob's photo

Jacob Asper

@@ -135,7 +135,7 @@
- Erika's photo + Erika's photo

Erika Teal

@@ -146,7 +146,7 @@
- Alexis' photo + Alexis' photo

Alexisintech

@@ -159,7 +159,7 @@
- Brian's photo + Brian's photo

Brian Schnee

@@ -170,7 +170,7 @@
- Alondra's photo + Alondra's photo

Alondra Mora

@@ -181,7 +181,7 @@
- Biancas's photo + Biancas's photo

Bianca T.

@@ -192,7 +192,7 @@
- Jacob Good's photo + Jacob Good's photo

Jacob Good

@@ -205,7 +205,7 @@
- Sebastian's photo + Sebastian's photo

Sebastian O.

@@ -216,7 +216,7 @@
- Alyssha's photo + Alyssha's photo

Alyssha L.

@@ -227,7 +227,7 @@
- Dana's photo + Dana's photo

Dana Lee