Javascript - Sequelize ORM Help

Hello there Experts!

I am a recently displaced .net programmer and currently enrolled in a Full Stack Wed Developer BootCamp.  I am struggling with some of the concepts as the volume of new material is overwhelming.  We are currently working on a project with Sequelize ORM's. I have attached a screen print of a piece of code that I am having a hard time understanding.  I tried to modify existing code for a search in an activity we did in class.

User with enter a Team and an Opponent.  I want to get all records for the user entered Team when they played the opponent.  
1) From the screen print, what is this doing --> app.get("/api/team/:team") is that a directory path?
2) I don't understand the use of the colon?
3) Looking through my notes I may have to have  --> app.get("/api/team/:team/:opponent") but what are :team and :opponent ? Are they folders, files, parameters...I don't understand.

Can you help me make sense of all this?

Who is Participating?
Julian HansenCommented:
app.get("/api/team/:team") is that a directory path?
That is a path to a web service REST or similar. the /api/team refers to the relative path on the server (i.e. added to the domain name of the server the original page comes from) the :team is a parameter to the service telling the service what function / data you want to run / return. So The app.get refers to how you want to retrieve that data.
get being the key bit says we want to do a GET request to the server (parameters passed in the URL rather than as part of the REQUEST BODY as in a POST.

The colon is used by the framework to determine what is a parameter,

I am guessing when you say app.get('/api/team/:team') you are asking the service to return you all the values by team name - whether or not your question is answered by adding :team and :opponent is dependent on the implementation - we would need to see documentation on the team service to be able to say what is correct or not.
Jimbo99999Author Commented:
Thank you for the reply. I understand now.  Unfortunately, I cannot get my add working to try the search.
Jimbo99999Author Commented:
Do you by chance know of a good resource that explains processes like you did?
Julian HansenCommented:
Apologies - missed your last question. There are many resources on the web - I would read a few of them and play with a few samples. The concepts are quite simple once you get into them.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.