shopfully
v0.0.0
Published
flyers api
Downloads
2
Readme
Flyer api
This Serverless project can serve the data in this csv file, following this specs
Instructions
Installation
- clone the repo or download and unzip the project
npm i
Deploy the service
cd shopfully npx serverless deploy
Run test (requires cakephp locally)
cd shopfully npm tests
Api
By default it serves on the port 4000 but the configuration can be changed in the docker-compose.yml file
/flyers/{{id}}
: returns a single flyer- fields int default
null
: field to show
- fields int default
/flyers
: returns the list of flyers, accepts the following GET arguments- page int default
1
: page number - limit int default
100
: page size - filter object default
null
: filter by values
- page int default
the api interface is decribed more formally in the openapi.yml
Resources
- flyers_data.csv: datasource
- 2020_Istruzioni_TestCase_BackEndDevMarketplace.pdf: specs
- docker-compose.yml: builds environment
- openapi.yml: OpenApi 3.0.0 spec
Note
The logic is handled in the parser.js file, the requests are served in the handler.js file