Delivery beer flights. Beerly is an app that allows users to have beer flights be delivered to them.
- Node / Express
- React
- Mongoose/MongoDB
- Google Maps API
- StripeJS
- Material UI
- BreweryDB
- S3
git clone https://github.com/ntoung/beer.ly.git
npm install
npm start
Instructions on how to get set up with HTTPS
- Create a key.pem / cert.pem file in the root directory of the project. (Same folder as index.js). Use this command:
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 30
// For passcode, type 'beerly' for now. You can change the passcode in server/middleware/SSL.js.
// For Common Name, type 'localhost'.
// For everything else, you can just leave it blank.
- Files have already been added to .gitignore so don't worry about adding them.
- Start the server as you normally would.
npm start
- Go to 'https://localhost:8008' to reach the server. Use https from now on. If you're using Chrome, it's going to complain that it's insecure. Just hit the 'Advanced' button and click 'Continue anyway'. You only have to do this once.
This endpoint is needed for the BeerList component. It makes an API request to BreweryDB to retrieve a list of available beers from a brewery.
{
id: "yEusNN",
name: "Acoustic Blondie",
nameDisplay: "Acoustic Blondie",
abv: "6",
isOrganic: "Y",
...
style: {
category: {
id: 5,
name: "Belgian And French Origin Ales",
},
name: "Belgian-Style Blonde Ale",
shortName: "Belgian Blonde",
description: "Belgian-style blond ales are characterized by ...",
...
}
},
This endpoint is needed for the BreweryList component. It makes an API request to BreweryDB to retrieve a list of available breweries at a location.
{
id: "wXmTDU",
name: "Main Brewery",
streetAddress: "563 Second Street",
locality: "San Francisco",
region: "California",
postalCode: "94107",
phone: "415-369-0900",
latitude: 37.7824892,
longitude: -122.3924905,
brewery: {
id: "EdRcIs",
name: "21st Amendment Brewery",
description: "The 21st Amendment Brewery offers a variety of...",
website: "http://www.21st-amendment.com/",
images: {
icon: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-icon.png",
medium: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-medium.png",
large: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-large.png",
squareMedium: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-squareMedium.png",
squareLarge: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-squareLarge.png"
},
...
},
country: { ... },
This endpoint is needed for the AutoComplete feature in the Search component. It interacts with Google Maps API and uses a location partial to query for predictions.
{
predictions: [
{
description: "San Francisco, CA, United States",
id: "1b9ea3c094d3ac23c9a3afa8cd4d8a41f05de50a",
matched_substrings: [ ... ],
,
types: ["locality", "political", "geocode"]
...
]
}