Skip to content

visar/world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

World API

Running the app

  • Copy the .env.example to .env and populate it with the proper environment variables.
  • Run the scripts/gen_initsql.py script. Either run it with pipenv:
pipenv run python scripts/gen_initsql.py

or load the .env environment file (through autoenv, or simply just source it) and then run the script with your python interpreter. Check if scripts/init.sql was created with the proper secrets populated.

  • Start the containers:
docker-compose up --force-recreate --build
  • You should have the api running on port 8080, while the frontend should be up on port 5000. Try hitting the /cities endpoint for example:
curl -X GET https://localhost:8080/cities

You may use whatever tool you like (http from httpie for example), or you can run the Postman collection from tests/postman. Open https://localhost:5000/ with your browser.