Tyler Calabrese, July 1, 2021 CS 120: Web Programming with Prof. Ming Chow
I've set up a POST route for my Node application that gives back a list of cars if the correct parameters are given in the body of the POST message.
For the "going beyond" items: I'm now inserting ride requests into a postgres database. I have a path where drivers can send POST requests to offer rides. I'm also using the rides that people have offered for the response to /rides. I'm giving a list of a passenger's ride requests from the route /passenger.json, and a vehicle's ride offerings from /vehicle.json.
Finally, the default GET path "/" shows a list of vehicles currently offering rides, in HTML.
I completed this lab alone.
I used these instructions when trying to make a table in my database. It didn't work for me, but the author still deserves recognition: https://dev.to/danielmabadeje/how-to-create-tables-on-heroku-postgresql-1n42
I've spent about four hours on this lab.
Tyler Calabrese, June 29, 2021 CS 120: Web Programming with Prof. Ming Chow
All parts of the lab have been completed.
I completed this lab alone.
I've spent about an hour and a half or two hours on this lab.
A barebones Node.js app using Express 4.
This application supports the Getting Started on Heroku with Node.js article - check it out.
Make sure you have Node.js and the Heroku CLI installed.
$ git clone https://github.com/heroku/node-js-getting-started.git # or clone your own fork
$ cd node-js-getting-started
$ npm install
$ npm start
Your app should now be running on localhost:5000.
$ heroku create
$ git push heroku main
$ heroku open
or
For more information about using Node.js on Heroku, see these Dev Center articles: