Skip to content

Commit

Permalink
Merge pull request #99 from Materials-Consortia/use_routers
Browse files Browse the repository at this point in the history
Using routers

All endpoints are created using FastAPI's `APIRouter` class.
This makes them easily re-usable for multiple base URLs.
  • Loading branch information
CasperWA committed Dec 2, 2019
2 parents bcd2b72 + ca19f54 commit 6675838
Show file tree
Hide file tree
Showing 25 changed files with 2,068 additions and 442 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ pre-commit install
conda install -c anaconda mongodb
mkdir -p ~/dbdata && mongod --dbpath ~/dbdata --syslog --fork
# Start a development server (auto-reload on file changes at http://localhost:5000
# Start a development server (auto-reload on file changes at http://localhost:5000/optimade
# You can also execute ./run.sh
uvicorn optimade.server.main:app --reload --port 5000
# View auto-generated docs
open http://localhost:5000/docs
open http://localhost:5000/optimade/extensions/docs
or
open http://localhost:5000/optimade/extensions/redoc
# View Open API Schema
open http://localhost:5000/openapi.json
open http://localhost:5000/optimade/extensions/openapi.json
```

When contributing to the Python code, please use the [black](https://github.com/ambv/black) code formatter.
Expand Down
Loading

0 comments on commit 6675838

Please sign in to comment.