This is an express application that defines several RESTful and authentication routes. The application is deployed on AWS EC2, the address is: http: //ec2-3-20-239-197.us-east-2.compute.amazonaws.com
You can clone this github repository to your local environment, and run:
to install all dependencies.
After installing all dependencies, run:
It runs the app in the development mode.
After seeing DB connection successfult, you can access the APIs below on http://localhost:4000
The user schema defines the attributes of an user object, also provides function to save a user into the User database. We use bcrypt to encrypt password before saving the user.
username: string
password: string
The submission schema contains the path, the username and the code of the submission:
path: string
user: string
code: string
This route will perform authentication with the input username and password.
This route will register a user with given username and password.
This route will create a new submission record in the database.
This route will find a submission by username and path
This route will find all submissions of a user by username