Welcome to my server!!! Here you can request a number of data which is basically the data for a house rental website from this server. By calling The Root API, you can get a simple "Hello World" which is not necessarily useful, but root URL is always important. So, I wanted to make you know that.
My client side code: https://github.com/Lamisa-zamzam/sweet-home/
My live site: https://sweet-home-910.web.app/
Secondly, if you call The Houses API, you will get the data of several visa to be ordered by the customers in an array. The array contains an object for each visa and each object contains some properties, namely: _id, id, houseName(title of the house, e.g. visa), price, detail and image(URL to the picture of the house). Though they are not real ones, however, that could work great as placeholders.
If you want to get the information of a specific house, you're gonna do that with https://shrouded-meadow-58285.herokuapp.com/house/:houseName. But wait!!! You have to replace :houseName with the name of the huse u want to get and also this API is private, so you are not going to get the info until you are logged in in My Website Sweet Home. Actually, this server was made only for this website, so this website has a power over this server. You can add a house to this server, add an order for your chosen visa, make an admin of the site and even delete or Update a house form here using that website. But again, you have to be logged in in that website and have the id and name of the specific service in the cases you need it.
You are able to check if a person is admin in the website with This get API. Note that you have to provide the email of the person as a query in the URL. This API https://shrouded-meadow-58285.herokuapp.com/bookings/:email gives all the bookings that have been made form a specific email. And to get a single house info by its id, use https://shrouded-meadow-58285.herokuapp.com/house/:id.
My project includes:
- Node.js,
- Mongodb,
- Express.js,
- Cross Origin Resource Sharing (CORS) ,
- Environment Variables and
- Heroku Deployment.
=> considering adding mongoose
Pull requsts are welcome. For major changes, please open a issue first and discuss what you would like to change.