-
Notifications
You must be signed in to change notification settings - Fork 7
Getting started
##Deployment If you are taking this API and deploying it there area few things you will need.
####config.js
In the project folder create a config.js
file that exports a config object.
module.exports = {
secret: String,
aws_bucket: String,
aws_access_key_id: String,
aws_secret_access_key: String,
sendGridKey: String,
};
-
secret
: Used for authentication. -
aws_bucket
: Name of your AWS S3 bucket. -
aws_access_key_id
: AWS access key. -
aws_secret_access_key
: AWS secret key. -
sendGridKey
: Your Sendgrid API Key
AWS is used to upload exercise files and images, these can later be managed from the media endpoints.
SendGrid currently the sendgrid templates are hardcoded, in a future release this will be abstracted for more customization.
##Authentication
All routes (except /v1/user/authenticate
) require you to be authorized. Make a GET
request to /v1/user/authenticate
to get your token. Every authenticated route requires a x-access-token
header with your token sent.
There are three levels of users.
- Admin
- Instructor
- Student
####Admin Has access to all routes.
####Instructor Has access to routes related to the courses they are in.
####Student Only has access to view the courses they are in.