Skip to content

tylerjcalabrese/node-js-getting-started

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lab 12 : The Ride Hailing Service, Part 3

Tyler Calabrese, July 1, 2021 CS 120: Web Programming with Prof. Ming Chow

Parts Completed

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.

Collaborators

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

Time Spent

I've spent about four hours on this lab.

Lab 11 : Getting Started with the Server Side using Heroku and Node.js

Tyler Calabrese, June 29, 2021 CS 120: Web Programming with Prof. Ming Chow

Parts Completed

All parts of the lab have been completed.

Collaborators

I completed this lab alone.

Time Spent

I've spent about an hour and a half or two hours on this lab.

node-js-getting-started

A barebones Node.js app using Express 4.

This application supports the Getting Started on Heroku with Node.js article - check it out.

Running Locally

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.

Deploying to Heroku

$ heroku create
$ git push heroku main
$ heroku open

or

Deploy to Heroku

Documentation

For more information about using Node.js on Heroku, see these Dev Center articles:

Packages

No packages published

Languages

  • EJS 52.3%
  • JavaScript 43.1%
  • CSS 4.5%
  • Procfile 0.1%