Author: Scott Falbo Version: 1.0.0 (increment the patch/fix version number if you make more commits past your first submission)
- To launch goto the Front end and insert the back end link without the trailing
/
.- Front End for deployment
- No longer live.
- Front End for deployment
This is a backend server that:
- Receives a request from the client.
- Retrieves data from an api, or local json in this case.
- Packages that data.
- Responds to the front end with the requested object.
To make this happen we will do the following:
- Install dependencies via npm.
express
,cors
,dotenv
- Create a
server.js
. - Bring in dependencies.
- Create routes for requests and responses.
- Retrieve the requested data and format it for front end templating via a constructor function.
- Respond to the request with the new object(s).
- Deploy to heroku to test with the City Explorer front end
- Node.js will be used along with:
express
this does somethingcors
: this does also somethingdotenv
As I understand it now this while hold our API keyssuperagent
will be handling ourGET
- Node will allow the JavaScript to run as a server outside of a browser environment.
server.js
is written in JavaScript and calls the above installed dependencies..json
files are currently holding our mock information.- objects are prepared for use with
Mustache.js
-
Feature: Locations
- Estimated time: 60 minutes
- Start time: 2:12pm
- Finish time: 2:43pm
- Actual time: 30 minutes
-
10-15-2020 2:45pm - Server is talking to the front end and displaying location information
-
Feature: Weather
- Estimated time: 45 minutes
- Start time: 2:46pm
- Finish time: 3:15pm
- Actual time: 30 minutes
-
10-15-2020 3:15pm - Application is displaying weather data
-
Feature: Errors
- Estimated time: 45 minutes
- Start time: 4:30pm
- Finish time: 7:50pm
- Actual time: 90 minutes cumulatively
-
10-15-2020 7:50pm - I think the error thing will work once there is a way to check the input against something.
-
Feature: Locations API
- Estimated time: 30 minutes
- Start time: 12:30pm
- Finish time: 1:05pm
- Actual time: 35 minutes
-
10-17-2020 1:05pm - the location is being accessed from the locationIQ api instead of locally from the
.json
files. Installed and refactored to usesuperagent
to handle.get
and.use
-
Feature: Weather API
- Estimated time: 60 minutes
- Start time: 1:30pm
- Finish time: 2:25pm
- Actual time: 55 minutes
-
10-17-2020 - Figured out the weather api. Learned about
.query()
. The weather handler takes in the location request and returns 8 days of weather based on latitude and longitude. -
Feature: Data Formatting
- Estimated time: 30 minutes
- Start time: 1:30pm
- Finish time: 2:25pm
- Actual time: 55 minutes
-
10-17-2020 - Did this while I was refactoring the weather handler. Replaced
.forEach()
with.map()
. Still a little confused on exactly what it's doing, looking forward to this weeks codes challenges. -
Feature: Trails api
- Estimated time: 45 minutes
- Start time: 3:00pm
- Finish time: 3:30pm
- Actual time: 30 minutes
-
10-17-2020 - Added the trails api. Returns the top ten trails in the searched area by using the
request
latitude and longitude. Same.map()
sorting as the weather.
-
Feature: Database
- Estimated time: 60 minutes
- Start time: 10:00am
- Finish time: 6:30pm
- Actual time: about 2 hours on and off
-
10-22-2020 - Added a database and tables in a
schema.sql
. Broughtpostgresql
into the server. -
Feature: Server
- Estimated time: 90 minutes
- Start time: 7:00pm
- Finish time: 9:00pm
- Actual time: 2 hours
-
10-22-2020 - Location information loads from cashed database if previously searched. If not an API call is made and the object is cached.
-
Deployed to Heroku with live database.
-
Feature: Movies
- Estimated time: 60 minutes
- Start time: 1:30pm
- Finish time: 2:10pm
- Actual time: 40 minutes
-
10-24-2020 - Getting movies back from the API, need to filter down the number of results. Going to do other stuff and then circle back to docs.
-
Feature: Yelp
- Estimated time: 60 minutes
- Start time: 2:30pm
- Finish time: 3:00
- Actual time: 30 minutes
-
10-24-2020 - Got the Yelp API hooked up and doing the things.
-
Feature: Pagination
- Estimated time: 90 minutes
- Start time: 3:45pm
- Finish time: 3:55pm
- Actual time: 10 minutes
-
10-24-2020 - Today's class basically did this, thought it would still be a hassle but it was super smooth. The yelp results paginate by 5 at a time.
- Learned about the
dateToString()
method from MDN after trying a million ways of converting theobject
and trying tosplice
it. - Working on the error message references the 301 class-06 demo code.
- had some help from Amber Falbo on some tricks for the weather api URL.
- query wiki Read through this a bit.