https://github.com/lsmoura/countries
a simple country list microservice
https://github.com/lsmoura/countries
expressjs flowtype javascript microservice node
Last synced: about 1 month ago
JSON representation
a simple country list microservice
- Host: GitHub
- URL: https://github.com/lsmoura/countries
- Owner: lsmoura
- License: mit
- Created: 2019-10-16T13:17:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-06-03T13:56:51.000Z (10 months ago)
- Last Synced: 2025-06-04T01:01:54.986Z (10 months ago)
- Topics: expressjs, flowtype, javascript, microservice, node
- Language: JavaScript
- Size: 616 KB
- Stars: 2
- Watchers: 1
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: readme.markdown
- License: license
Awesome Lists containing this project
README
# Countries
A very simple micro-service for supplying country information
## Running
It's very simple to build and run using docker
* Building
This is optional, as you can use the currently published docker version
```
docker build -t lsmoura/countries .
```
* Running
```
docker run --rm -d -p 3000:3000 lsmoura/countries
```
After issuing the command above, you can start making queries
## Using
Just do HTTP calls to the microservice. There is no database nor authentication needed.
Everything needed is loaded into memory when the container is started.
* Retrieve every country
`curl http://localhost:3000/`
* Retrieve a single country by "alpha2"
`curl http://localhost:3000/ca`
* Retrieve a single country by "alpha3"
`curl http://localhost:3000/usa`
* Retrieve a single country by "numeric code"
`curl http://localhost:3000/76`
# Author
* [Sergio Moura](https://sergio.moura.ca) https://sergio.moura.ca