Skip to content

Created API for code editor which allows admin to add question, text case in sphere engine. And can show result for submitted code

Notifications You must be signed in to change notification settings

ank-2222/onlineCode-Editor--backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Editor Backend

PostMan Documentation

  • checkout postman documentation for detailed Description

Installation

Install with npm

To run server

 npm i
 npm run dev

All API call(except Register and Login) should contain access token in headers with key "auth-token"

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PORT- port number

ACCESS_TOKEN- Sphere engine API

ENDPOINT - sphere engine Endpoint

MONGO_URI - mongo db url

TOKEN_KEY - Secret Token key

API Reference

Register User

  POST /api/auth/register

Returns access token and email

Login user

  POST /api/auth/login

Returns access token and email

Add problems

  POST /api/admin/problems

Returns problemId and problemCode

Get problem list

  GET /api/admin/problems?limit={n}

Returns List of Problems added

Parameter Type Description
n int Required. no. of problem to be fetched in one call, can be used in pagination

Get problem Description

  GET /api/admin/problems/{id}

Returns Problem Details

Parameter Type Description
id int Required. problem ID

Update Problem

  PUT /api/admin/problems/{id}
Parameter Type Description
id int Required. problem ID

Delete Problem

  DELETE /api/admin/problems/{id}
Parameter Type Description
id int Required. problem ID

Add test cases

  POST /api/admin/testcase

Get test cases

  GET /api/admin/testcase/{id}

Returns all the test case of problem

Parameter Type Description
id int Required. problem ID

Get submission status

  POST /api/participant/submissions

sends Submission status to User's Email(using nodemailer)

Returns status of submission of code

About

Created API for code editor which allows admin to add question, text case in sphere engine. And can show result for submitted code

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published