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.
-
Return to GitHub’s homepage and add a new repository.
-
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.
-
Click “Create repository”.
-
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
-
We should see our updated URL by running:
git remote -v
-
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 1400+ tech skills courses.