Skip to content
Tianci Zhong edited this page Dec 21, 2016 · 9 revisions

HTTP EndPoints

Get the instructor information by the given instructor id:

GET /stats/instructors/{id}


Get the instructor information by the given instructor id:

GET /stats/instructors/{id}/courses/{cid}/hw/{hid}


Get the student information with the given student id:

GET /stats/students/{id}


Check the user’s email and password:

POST /auth/login


Register the user’s email, password, username and role as student or instructor:

POST /auth/reg


Upload student avatar to the S3 bucket on AWS:

POST /upload


Upload video to the S3 bucket on AWS:

POST /uploadVideo

Path

####Student Dashboard The student overview page can be access by the path:

http://localhost:3000/student/#/overview/{sid}

The student tasks page can be access by the path:

http://localhost:3000/student/#/tasks/{sid}

The student account page can be accessed by the path:

http://localhost:3000/student/#/account/{sid}

####Instructor Dashboard The instructor overview page can be access by the path:

http://localhost:3000/instructor/#/overview/{id}

The instructor upload video page can be access by the path:

http://localhost:3000/instructor/#/uploadVideo/{id}

Development

To run the program, you need to install node and npm first. If you are using a Mac OS system, they can easily install using the commend below:

$ brew install node
$ brew install npm

To install all the library and requirements specific for this repo, you can run the commend:

$ cd sage-frontend
$ npm install

This commend will find and install all the requirement noted in the package.json file under the folder node_modules. To save module to the package.json file run the commend:

$ npm install <package_name> --save

Then, you need to enter the AWS accessKeyId and secretAccessKey in the file aws-config.json inside the config folder.

$ cd sage-frontend/config
$ cat aws-config.json
   {
      "accessKeyId": "Your accessKeyId",
      "secretAccessKey": "Your secretAccessKey",
      "region": "us-east-1"
   }
Clone this wiki locally