This site was created as an Epicodus independent project. It uses the BetterDoctor API to find doctors near you.
Make sure you have git version control installed on your computer.
- Find the green 'Clone or Download' button and copy the link
- Open your terminal and type...
Windows
cd desktop
Mac & linux
cd ~/Desktop
- Then clone the repositor by typing:
git clone https://github.com/dustatron/Doctor-Lookup.git
- Navigate to the new folder that was created by typing:
cd folder name
- Now install all node packages by typing:
npm install
- Get an API key from BetterDoctor API
7.Get an API key from OpenCage Geocoder
- Create a new '.env' file by typing:
touch .env
- Open the .env file in your test editor and add the following:
API_KEY = YOUR UNIQUE API KEY FOR BETTERDOCTOR API
GEO_API_KEY = YOUR OPENCAGE API HERE
- Now run the development server
npm run start
- Edit files in '/src' to make changes to the project.
Behavoir | Input | Output |
---|---|---|
1 - A user will enter a keyword and the program will return a listing of doctors near them. | 'couching' | return list of doctors |
2 - A user will enter a name and the program will return a list of doctors. | McCord | return list of Doctors with the name McCord |
3 - The program will return a list that includes first name, last name, address, phone number, website and whether or not the doctor is accepting new patients. | McCord | list with first name, last name, address, phone number, website and whether or not the doctor is accepting new patients |
4 - When the API returns an error the program will return a message stating the issue | API returns error | show error |
5 - If the API returns no doctors the program should tell the user no Doctors where found | API returns an empty array | "No Doctors with your search criteria where found" |
6 - A user can input a city and the program will return a list of doctors in that city | Seattle | list of doctor in seattle based on search terms |
7 - The user can search for both name and keyword. The program will return a list of doctors based city, keyword, and name | seattle, Geltzer, cancer | Dr. Allen J Geltzer, MD |
The software is provided as is. It might work as expected - or not. Use at your own risk.
- HTML - Simple Scaffolding
- JavaScript - Used for interactivity in the page
- jQuery - Used to interact with the DOM
- Bootstrap 4.4 - Used for styling
- webpack
- Sass
- ESLint
- Node.js
- Uglifyjs
- Jest
- dotenv
- BetterDoctor API
- OpenCage Geocoder
Make sure you have an '.env' in the top level of your project. The syntax should look like this
API_KEY = YOUR UNIQUE API KEY GOES HERE
OTHER_API_KEY = OTHER UNIQUE API KEY GOES HERE
Use this syntax in your query string:
'process.env.API_KEY'.
Example query string:
const city = 'get city from user';
const url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${process.env.API_KEY}`;
Add this to your eslinter settings file under env:
...
"extends": "eslint:recommended",
"env": {
"node": true //allows env api key
}
...
- Old School Gifs Search
- free images @ unsplash
-
source.unsplash.com will return a random image at a desired size by simply calling the size after the url followed by a '?' and a keyword. Example below
-
http://unsplash.it/500/500 - This will just return a random image the size of 500x500
-
This project is licensed under the MIT License - see the LICENSE.md file for details
Copyright (c) 2020 Dusty McCord