Table of Contents
|
|
|
|
![]() |
Code-N-Collab server is backend for Code-N-Collab , It make Code-N-Collab real-time collaborative using sockets and also serves as backend for blogs
It provides users with :-
-
Real-time code editor : Users can collaborate with their team on issues and solve CP problems using a real-time code-editor(like Google Docs)
-
Lockout Championship : For Cp lovers, they can compete in a lockout championships with their friends to and challenge your friends for championship,filter problems with preferred difficulty and improve you CP skills
-
Blogs : To find new people and share your knowledge , platform provides users blogs to write learn and share
-
Setup API&Credentials for Web Application
-
Provide a Redirect URI in the Credentials(The redirect_URI will be used to redirect to the page after login with google,in below environment variable example we have setup redirect_URI=http://localhost:3000/homepage/ , using port 3000 you can use any port but make sure to add /homepage after that to redirect to correct route)
-
copy <YOUR_GOOGLE_CLIENT_ID> and <YOUR_GOOGLE_CLIENT_SECRET>
- Atlas Docs
- get the <MONGO_DB_URL> from your cluster , you have to use it in env vars
- you can declare your env vars using dotenv like below :
CORS_ORIGIN=*
GOOGLE_CLIENT_ID=<YOUR_GOOGLE_CLIENT_ID>
GOOGLE_CLIENT_SECRET=<YOUR_GOOGLE_CLIENT_SECRET>
redirect_URI=http://localhost:3000/homepage/
BaseURI=http://localhost:8080/
MONGO_DB_URL=<YOUR_MONGO_DB_URL>
COMPILE_CLIENT_ID1=<COMPILE_CLIENT_ID1>
COMPILE_CLIENT_SECRET1=<COMPILER_CLIENT_SECRET1>
COMPILE_CLIENT_ID2=<COMPILE_CLIENT_ID1>
COMPILE_CLIENT_SECRET2=<COMPILER_CLIENT_SECRET1>
COMPILE_CLIENT_ID3=<COMPILE_CLIENT_ID1>
COMPILE_CLIENT_SECRET3=<COMPILER_CLIENT_SECRET1>
COMPILE_CLIENT_ID4=<COMPILE_CLIENT_ID1>
COMPILE_CLIENT_SECRET4=<COMPILER_CLIENT_SECRET1>
- or you can declare your env vars in nodemon.json if you are using nodemon for development like below:
{
"env":{
"CORS_ORIGIN":"*",
"GOOGLE_CLIENT_ID": "<YOUR_GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<YOUR_GOOGLE_CLIENT_SECRET>",
"redirect_URI" : "http://localhost:3000/homepage/",
"BaseURI":"http://localhost:8080/",
"MONGO_DB_URL":"<YOUR_MONGO_DB_URL>",
"COMPILE_CLIENT_ID1":"<COMPILE_CLIENT_ID1>",
"COMPILE_CLIENT_SECRET1":"<COMPILER_CLIENT_SECRET1>",
"COMPILE_CLIENT_ID2":"<COMPILE_CLIENT_ID1>",
"COMPILE_CLIENT_SECRET2":"<COMPILER_CLIENT_SECRET1>",
"COMPILE_CLIENT_ID3":"<COMPILE_CLIENT_ID1>",
"COMPILE_CLIENT_SECRET3":"<COMPILER_CLIENT_SECRET1>",
"COMPILE_CLIENT_ID4":"<COMPILE_CLIENT_ID1>",
"COMPILE_CLIENT_SECRET4":"<COMPILER_CLIENT_SECRET1>"
}
}
$ git clone https://github.com/<your-username>/Code-N-Collab-Server.git
$ cd Code-N-Collab-Server
$ git remote add upstream https://github.com/atharmohammad/Code-N-Collab-Server.git
$ npm install
$ npm start // if you are using dotenv
//or
$ npm run dev // if you are using nodemon.json
we encourage organizations and individuals to contribute requirements, documentation, issues, new templates, and code. For code contributions, read :
Mohd Athar - mohd.rule123@gmail.com
Adnan Shamsi - adnanshamsi023@gmail.com