Buddy compatible api service for MinElev
All API calls needs an Authorization header with valid jwt
GET /students?name={name}Search all your students
GET /students/{id}Get a specific student
GET /students/{id}/contactteachersGet all contact teacher for a given student
GET /teachersGet all teachers
GET /teachers/{id}Get a given teacher
GET /teachers/{id}/contactclassesGet all contact classes for a given teacher
GET /teachers/{id}/studentsGet all students for a given teacher
GET /classesGet all classes
GET /classes/{id}Get a given class
GET /classes/{id}/studentsGet all students in a class
GET /classes/{id}/teachersGet all teachers in a class
GET /schoolsGet all schools
GET /schools/{id}Get a given school
GET /schools/{id}/teachersGet all teachers for a given school
Get /schools/{id}/studentsGet all students for a given school
Get /pingReturns pong
Add a local .env file
NODE_ENV=development
JWT_SECRET=jwt-secret-for-the-service
MONGODB_CONNECTION=mongodb-connection-string
MONGODB_COLLECTION=mongodb-collection-name
MONGODB_NAME=mongodb-name
LOGGED_IN_USER=username-for-testuser
PAPERTRAIL_HOST=papertrail-host
PAPERTRAIL_PORT=12345
Start the dev environment
$ npm run dev
In the utils directory you'll find a test call method.
Add the url you want to test and run the script
$ node utils/testcall.js
Configure now.json
Run the deployment script
$ npm run deploy
docker run -d \
-p 3000:3000 \
--env-file docker.env \
--name tjommi-api \
telemark/minelev-tjommi-api
Content type
Image
Digest
Size
57.3 MB
Last updated
over 6 years ago
docker pull telemark/minelev-tjommi-api