A simple serverless implementation to get the next item in adaptive test
-
via official website Download | Node.js or using nvm
nvm install v12 nvm use v12
-
npm install -g serverless@latest
-
Clone the repo
git clone git@github.com:saraansh/adaptive-test-serverless.git
-
Cleanup & install packages
rm -rf ./node_modules rm *-lock.json npm install
-
Install python modules
pip install -r requirements.txt
-
Start the app (offline mode)
npm run start:offline
-
With the app running, you can now call the following endpoints:
i.
get-next-test-item
📎curl --location --request POST 'http://localhost:5000/development/get-next-test-item' \ --header 'Content-Type: application/json' \ --data-raw '{ "testItemIds": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], "visitedItemIds": ["7", "4"], "visitedItemResponses": [false, true], "currentProficiency": 0, "maxVisitedItemsCount": 5 }'