Git Product home page Git Product logo

city-service's Introduction

CITY SERVICE

A microservice that gives information about the cities and connections in a DB

  • This microservice is implemented using Spring Boot, Spring Cloud and PostgreSQL
  • The instructions below are for Debian based systems, in particular Ubuntu.

City DB

The DB has two tables:

  • A table that stores cities with the following attributes:
    • id
    • name
  • A table that stores connections and time
    • city_origin
    • city_destination
    • departure
    • arrival

There are some script to populate the DB in /db

You can run the following the next steps:

  1. cd db/
  2. psql -h <host> -p <port> -U <username> -W <password> -d <database> -f DATA.sql

Information about DB is in config/ directory

Dependencies

  • Java 8 or Docker

Instructions to run the whole project

Here are the instructions to run the project (without docker):

  1. Clone this repository, in your PC (git clone)
  2. Execute the following command to export env variable an run the project:
cd city-service/config
export $(cat config.env | xargs)
cd ../
./mvnw spring-boot:run
  1. You will be able to access its api in http://<ip_city_service>:8090/swagger-ui.html

city-service's People

Contributors

alejandra21 avatar

Watchers

 avatar

city-service's Issues

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.