Concluding API Setup and Installation

Let's reflect on what we’ve done so far and upload our API to GitHub.

We'll cover the following

What have we done so far?

We’ve successfully set up the API and our two databases. Now we’re ready to add our API to GitHub.

  1. Return to GitHub’s homepage and add a new repository.

  2. We’ll need to name our repository. Keeping the directory and repository names the same can help keep the two aligned, but it’s not required.

  3. Click “Create repository”.

  4. Because the API was cloned from an existing repository, we’ll need to update its remote repository URL. Run the following command: git remote set-url origin \ https://github.com/your-username-here/lets-get-lunch-api.git

  5. We should see our updated URL by running: git remote -v

  6. From there, we can push our API up to our GitHub repository by running: git push origin master

Note: Git may ask you to set your account’s identity before committing changes to the GitHub. For this, use the following commands to set your email address and username.

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

Run the code below and execute the commands in the lets-get-lunch-api directory.

Get hands-on with 1200+ tech skills courses.