Skip to content

Commit

Permalink
#87: Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Oct 15, 2019
1 parent 791c993 commit b7d473f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ This is illustrated below.
└── config.json
`````
#### Main:
The main entry point is in `/src/main.py`. This is where each endpoint route is defined and its
related class imported e.g.
`api.add_resource(DatafilesWithID, "/datafiles/<int:id>")`
`main.py` is where the flask_restful api is set up. This is where each endpoint resource class is
imported and mapped to an endpoint.

Example:
`api.add_resource(DatafilesWithID, "/datafiles/<int:id>")`
This means that the http methods defined in the `DatafilesWithID` class are mapped to `/datafiles/<int:id>`

#### Endpoints:
The logic for each endpoint are within `/src/resources`. They are split into entities
Expand Down

0 comments on commit b7d473f

Please sign in to comment.