Git Product home page Git Product logo

pharmacies_finder's Introduction

Pharmacies Finder

An useful solution to find the pharmacies closest to you

For now available only for Campania region.

Step to follow:


Installation

  • Clone the project as follow:

    git clone [email protected]:gsaraceno92/pharmacies_finder.git

  • Copy .env.example into .env

    Note: edit docker .env file only if build fail; that probably means that your user id (in ubuntu system) is different from this one. In this case update with your own id.


Setup

These are the instructions to follow to set up the project on your local environment.

  1. Build the Docker image

    docker-compose up --build -d
    
  2. Use docker image ls and docker container ls (or docker ps) to see your images and the running containers

  3. Enter into the container with

    docker exec -it finder_pharmacies bash
    

Starting and stopping containers

Once created, the containers can be started anytime with the following command:

`docker-compose -f up -d`

To stop the containers, use instead:

`docker-compose stop`

...continue

Sometimes Flask application could not reload automatically the changes (since the binding volume e the work type used to run the app); in this case just restart the container with docker-compose restart.

Note: the above commands must be used in the same folder of the project. If you want to use the commands anywhere use -f to specify the docker-compose file position, e.g.:

`docker-compose -f ./docker-compose.yml up -d`

Running tests

Run the files inside tests directory as follow:

`docker exec -it finder_pharmacies python3 tests/test_pharmacy.py`

Site

The app will run through http://localhost:5000. In particular you can visit http://localhost:5000/api/browse; here can be used the JSON-RPC method.

Use the method SearchNearestPharmacy to retrieve the nearest position to the location set by latitude and longituted in currentLocation parameter.

Define the range (in meters) in which you want to search and set the result size with the limit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.