/castle-api

🏰Express app for Relais & Chateaux

Primary LanguageJavaScript

Castle API

Express API for Castle project

This tool allow accessing firebase database hotels in order to use it in the client interface.

Express for API management.
Firebase for database management.

This project is a micro-service of Castle project including castle-client and castle-cron-job.

How to use it

Docker Usage

First, build the Dockerfile:

$ docker build -t castle-api .

Now run this image previously built:

$  docker run --rm -p 4000:4000 castle-api

Routes

/hotel/:destination

Returns the hotels of the destination specified in the parameter. Ex: http://localhost:4000/hotel/france

/hotel/:destination/:id

Returns the hotel of the destination / id specified in the parameters. Ex: http://localhost:4000/hotel/france/ed1834392