Skip to content

rubygitflow/geocoder_microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geocoder Microservice

Geocoder microservice from Ruby Microservices course

It's set up so you can clone this repository and base your application on it:

$ git clone git@github.com:rubygitflow/geocoder_microservice.git app_geo && cd app_geo && rm -r -f .git/

Initialize and configure a new Git repository (you need to have a personal access token):

$ git init
$ git config --global user.name # get USER_NAME from your own Git repository
$ git config --global user.name USER_NAME # set USER_NAME from your own Git repository if the "global user.name" is empty
$ git config --global user.email USER_EMAIL # set USER_EMAIL from your own Git repository if the "global user.name" is empty
# create the new repository
$ curl \
  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  https://api.github.com/user/repos \
  -d'{"name":"app_geo", "description":"Some information"}'
$ git remote add origin git@github.com:USER_NAME/app_geo.git 
$ git add . && git commit -m 'init project'
$ git push -u origin master

For more details, see the github docs

Environment setup

$ bundle install

Run App

You can either set up configuration into config/initializers/config.rb, config/settings/*.yml and config/settings.yml or config/settings.local.yml before running

$ bin/puma
$ bin/console

or run the application with modified configuration using environment variables as well

$ RACK_ENV=test bin/puma
$ RACK_ENV=test bin/console

HTTP-requests to the app

Use the URL port setting in config/puma.rb to manage multiple microservices in the same environment.

$ curl --url "http://localhost:3002/?city=Moscow" -v
$ http -f get ":3002/" "city=Moscow"

Run tests

$ bin/rspec

Additional tips

  1. The list of all tasks is called by the command:
$ bin/rake --tasks

Author

About

Geocoder microservice from Ruby Microservices course

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages