With our common library all put together we're now going to start on our tickets service for real this
time.
Don't let's take a look at a couple of diagrams and understand how we're going to design and build this
thing.
All right.
So first off listing of the different routes we're going to build into this micros service in total
for different routes.
One route to retrieve all tickets one to get a tick with a specific I.D. one to create a ticket and
one to update a ticket.
You'll notice on creating and updating a ticket I've said that we're going to include a body that has
a title that is a string and a price that is a string as well.
That is not a mistake.
Our price is going to be communicated as a string.
There is a specific reason for this and I'll show you why.
As we get closer to actually building this ticket creation and update functionality as we start to build
out the service we are going to need some location to store all this ticket data so the information
about the title of the event that we are trying to sell access to the price of the ticket and who owns
this ticket.
So our ticket service is going to have its own individual copy of Mongo DB.
This is 100 percent separate from the Mongo to be instance we are created for that auth service earlier.
Inside there will probably end up with some kind of tickets collection.
And right now I anticipate that for every ticket we store will probably want to store the title the
price and the idea of the user who created this ticket and presumably owns it.
We're going to eventually add in some additional properties to every ticket but these extra properties
aren't going to make sense until we start to add in one or two other services into our application.
How are we going to actually create the thing.
Well it's going to be very similar overall to the off service they're going to create a package based
on file.
We're gonna install a ton of dependencies.
We'll write out a docker file start to build the implementation building an image push it to Docker
Hub.
We're going to write out some McCain aides file to create the deployment and the service or our ticketing
stuff.
We're gonna make sure we update that scaffold file to do that file sinking stuff.
Then finally we'll also create a case file or cabinet his file for the Mongo e deployment and the service
as well.
So this is what we would normally go through just about every time we want to create a new service.
But in this course just to save ourselves a little bit time and a little bit of headache.
Well actually a lot of time to be honest with you we're going to kind of skip the first three steps
or so let me tell you what I mean.
These first three steps we essentially already have done inside of our op service so rather than creating
a raw package based on file listing on all dependencies doing the docker file and then putting together
all the code from scratch to create an express server while middleware and so on.
We're going to pretty much just copy a lot of code directly from our auth service just to save ourselves
a little bit of time so we're really going to do a little bit of copying and then we're going to resume
from right here.
We'll build out an initial image then we'll do the Cuban neti stuff the scaffold stuff and so on.
So again just to save some time on an oral project we may or may not do this really depends on what
you're building but it's definitely in to save us time in our case.
So now we understand what we're gonna do.
Quick pause here.
Let's get to work in the next video.